Created
June 6, 2014 22:44
-
-
Save rxaviers/ad1f1e45c825e8c0a0c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -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