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

removed global timer to handle multiple uses calls #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jordang
Copy link

@jordang jordang commented Aug 24, 2014

Great little plugin! Thanks for doing this!

Change info: using this for multiple events at once was causing one call to kill the timer for the other one. attaching the timer to "this" seems to solve that problem

using this for multiple events at once was causing one call to kill the timer for the other one.  attaching the timer to "this" seems to solve that problem
@keyjote
Copy link

keyjote commented Apr 7, 2015

wow, thanks @jordang, this fix of yours helped me a lot. Now it works with bootstrap 3 and also as you mention in your comments, it is more clear with the new name (afterEvent) and also easier to follow.

I hope @yckart accepts your patch, as it does solve the problems this little plugin have.

@yckart
Copy link
Owner

yckart commented May 12, 2015

Hey, sorry for the delay and big thanks for your contribution! I had the plan to add throttle and debounce support, so I take some time to fiddle out what's the best way to go. Renaming this little helper is defnitly a good idea. When I wrote it, I was young and naiv ;)

I've thought about something like this

$('selector').unevent('resize:debounce', function () {

}, 250);

...but, take a look at the following example. It's pretty similar and you will never ever need this plugin (just a helper function like this:

$('selector').on('resize', _.debounce(function () {

}, 250));

Any thoughts on this?

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

Successfully merging this pull request may close these issues.

3 participants