Skip to content

Instantly share code, notes, and snippets.

@rxaviers
Created June 6, 2014 22:44
Show Gist options
  • Save rxaviers/ad1f1e45c825e8c0a0c8 to your computer and use it in GitHub Desktop.
Save rxaviers/ad1f1e45c825e8c0a0c8 to your computer and use it in GitHub Desktop.
@@ -6,8 +6,6 @@
*/
(function($) {
-var triggerChangeDelay = 200;
-
$.fn.farbtastic = function (options) {
$.farbtastic(this, options);
return this;
@@ -192,14 +190,7 @@
// Change linked value
$(fb.callback).each(function() {
if (this.value && this.value != fb.color) {
- var element = $(this);
this.value = fb.color;
- if(fb.triggerChange) {
- clearInterval(fb.triggerChange);
- }
- fb.triggerChange = setTimeout(function() {
- element.trigger("change");
- }, triggerChangeDelay);
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment