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

afterChange event #65

Closed
claviska opened this issue Jan 31, 2013 · 1 comment
Closed

afterChange event #65

claviska opened this issue Jan 31, 2013 · 1 comment
Labels

Comments

@claviska
Copy link
Owner

A lot of users require an efficient way of updating something within a specified timeframe after a change has occurred, but not on every single change event (because it fires very rapidly when dragging). This issue is a reminder for me to add this functionality into MiniColors.

The concept is a callback that fires at a configurable amount of time after the change event, but gets deferred on subsequent change events that fire before it is executed. This will be achieved with a setTimeout/clearTimeout to handle the delay. The options I'm proposing are:

$('input').minicolors({

    // delay the afterChange callback by half a second
    afterChangeDelay: 500

    // the callback function to execute
    afterChange: function() { ... }

});

If anyone has alternative suggestions for the callback name then please submit them here. I'm going to try to work this feature into the plugin this week if time permits.

@claviska
Copy link
Owner Author

claviska commented Feb 2, 2013

After further consideration, I decided it would be better to simply add a changeDelay setting that, when set, would defer the change event from firing until the user finishes making their selection. This functionality is now available in 2.0.0-beta.4.

@claviska claviska closed this as completed Feb 2, 2013
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

1 participant