Permalink
Browse files

ensure change event is still fired

  • Loading branch information...
1 parent 62c426d commit 888d8f480bfc557614ccf31e98e2fb2192be555d @bronson committed Jan 30, 2012
Showing with 7 additions and 2 deletions.
  1. +7 −2 jquery.miniColors.js
View
@@ -180,7 +180,8 @@ if(jQuery) (function($) {
input.data('huePicker', selector.find('.miniColors-huePicker'));
input.data('colorPicker', selector.find('.miniColors-colorPicker'));
input.data('mousebutton', 0);
-
+ var oldValue = input.val();
+
$('BODY').append(selector);
selector.fadeIn(100);
@@ -208,7 +209,11 @@ if(jQuery) (function($) {
}
if( $(event.target).parents().andSelf().hasClass('miniColors') ) return;
-
+
+ if(input.val() != oldValue) {
+ input.trigger('change');
+ }
+
hide(input);
});

0 comments on commit 888d8f4

Please sign in to comment.