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
Triggering rewritten #32
Comments
I think the way you suggest is correct; the jQuery docs themselves suggest this kind of format (which is along the lines of your suggestion):
Obviously the idea is to make the plugin as modular as possible, i.e. we could add other methods at a later date. |
Perfect. I should have this done in a few hours or by tomorrow morning (London time). |
Pretty sure this is in the bag. I'll be testing this thoroughly tomorrow, but I think this also justifies a version to update 1.6. Once tested properly, I'll be pushing it to the repo. |
Boom, this is done. The only thing we don't have support for is where options are blank, like so...
I can add this in, but not sure if it's a good idea. I have a feeling it would cause a flood of issues for 'why doesn't this work?' when the plugin/markup hasn't been setup properly. |
+1 !!!! |
I've been thinking more and more how awesome it would be to rewrite triggering of events in the plugin. Right now, triggering the plugin to pause would be written as...
$(window).trigger('pause.infscr');
or$(window).trigger('pause.infscr', ['pause']);
What I'd like to do is modify this to...
$('#selector').infinitescroll('pause');
Aside from just being much more intuitive to write, maybe this could free up some of the bindings. Whenever I look at the code I can't help but think how sloppy that bit is.
My only concern is passing in arguments to this. This could be done with the
.
character, so the syntax would be...$('#your-selector').infinitescroll('method.argument');
.Thoughts, ideas, feedback, etc. appreciated!
The text was updated successfully, but these errors were encountered: