Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

When require zepto.js it does run! #11

Open
snamper opened this issue Feb 17, 2013 · 2 comments
Open

When require zepto.js it does run! #11

snamper opened this issue Feb 17, 2013 · 2 comments

Comments

@snamper
Copy link

snamper commented Feb 17, 2013

when i replace the query with zepto ,but it doesn't run。

@stela5
Copy link

stela5 commented Feb 18, 2013

Here's how I got it to work:

in stonehenge.js

change

_results.push(thumbs.push($("<img src='" + img.url_s + "' />").load(function() {

to

_results.push(thumbs.push($("<img src='" + img.url_s + "' />").on("load", function() {

change

$("<img src='" + img.url_z + "' />").load(function() {

to

$("<img src='" + img.url_z + "' />").on("load", function() {

(optional code cleanup) in images.js

  • replace http: with https:
  • remove line 14 (image no longer exists on flickr)

in index.html

change

<script type="text/javascript" src="../../lib/jquery.1.7.2.js"></script>

to

<script type="text/javascript" src="https://github.com/ftlabs/fastclick/raw/master/lib/fastclick.js"></script>
<script type="text/javascript" src="http://zeptojs.com/zepto.js"></script>
<script type="text/javascript" src="https://github.com/madrobby/zepto/blob/master/src/fx_methods.js"></script>

replace the google-analytics code at the bottom of index.html with

    <script type="text/javascript">
        window.addEventListener('load', function() {
            new FastClick(document.body);
        }, false);
    </script>

@snamper
Copy link
Author

snamper commented Feb 20, 2013

thank you very much

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants