Giter VIP home page Giter VIP logo

Comments (8)

zspitzer avatar zspitzer commented on May 24, 2024

can you create a fiddle? you could fork the one in #30 as a starting point (update the script src, it points to the feature branch)

from jquery.lazy.

dkern avatar dkern commented on May 24, 2024

Well, he's right. The problem is, that destroy() (as called on autoDestroy) removes all events by the namespace .lazy. There is no check or handling for multiple instances. The problem would be solved, if you include two script files with different names on line #550. 😄 But that should not be the workaround.

Maybe I implement an "instance count" witch will be added to the namespace. Or make the name configurable. But then the user had to known that behavior. Or something else. Have to think about that ...

from jquery.lazy.

zspitzer avatar zspitzer commented on May 24, 2024

for debugging single page apps, it would be nice to be able to pass in something meaningful for the namespace, like cid in backbone.js

from jquery.lazy.

dkern avatar dkern commented on May 24, 2024

There is a thing for this. It's the instance name. But the problem is, that it is actually not configurabe from the "outside". I should have to make this within an update ...

from jquery.lazy.

dkern avatar dkern commented on May 24, 2024

I fixed this issue in srcset branch and will be added to the master within the next update. Feel free to give it a try. Thans for reporting.

from jquery.lazy.

razola avatar razola commented on May 24, 2024

I would also need a fix for this. Is the plan that the srcset branch will replace the current master branch? If so I might as well use that one, even though I don't use responsive images..

from jquery.lazy.

dkern avatar dkern commented on May 24, 2024

Hello @razola,

yes, the srcset branch will be merged to the master as the next version. But the branch is actually not completely tested. The auto destroy problem is fixed, but there were made some more changes in the branch, like new features. So is should be working, but no guarantee. I think the updated will be released within the next 1-2 weeks.

If you want to use the actual srcset branch, I would recommend to use this particular version of Lazy, because it is an early state, with the auto destroy fixed:
https://github.com/eisbehr-/jquery.lazy/blob/140bc715ac202d8d37d9e8559c7209d057c01ca6/jquery.lazy.min.js

from jquery.lazy.

razola avatar razola commented on May 24, 2024

@eisbehr- thanks for the quick reply!

I'll use the version you specified until the next release.

from jquery.lazy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.