Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lazyload. An opportunity to bind several events. #72

Open
stpetr opened this issue Nov 22, 2012 · 2 comments
Open

Lazyload. An opportunity to bind several events. #72

stpetr opened this issue Nov 22, 2012 · 2 comments
Labels

Comments

@stpetr
Copy link

stpetr commented Nov 22, 2012

Could you create such a feature that users to be available to bind more than one event?
Like this:
$('img.lazy').lazyload({
event: 'scroll,foo,bar'
});

@gillyb
Copy link

gillyb commented Jan 10, 2013

I see in the plugin, the binding is done using jQuery.bind() which accepts multiple event names, but without the comma delimiter you added.
Hence, you should be able to bind to multiple events like this : $('img.lazy').lazyload({event:"scroll foo bar"});
But from what i can see, something else related to this should be fixed. I see the plugin always assumes the 'scroll' event will be first in the method list, and this isn't necessarily correct. I think i will fix this and submit a pull request.

@TomHart
Copy link

TomHart commented Sep 26, 2014

Could I use that method to have it load the default way it does, and use a custom event too? So if the container scrolls, OR the user does XYZ?

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

No branches or pull requests

3 participants