mirror of
https://github.com/PitPik/tinyColorPicker
synced 2025-07-06 09:34:28 -06:00
demo update
This commit is contained in:
parent
6792ca13d5
commit
4f88b1a626
15
index.html
15
index.html
@ -294,11 +294,16 @@ window.myColorPicker = $('input.color').colorPicker({
|
||||
var that = this;
|
||||
|
||||
$elm.append('<div class="cp-patch"><div></div></div><div class="cp-disp"></div>');
|
||||
// $(document).on('click', '.trigger', function(e) {
|
||||
// if (e.target === this && $(this).hasClass('active')) {
|
||||
// that.toggle(false);
|
||||
// }
|
||||
// })
|
||||
$('.trigger').on('click', function(e) {
|
||||
if (e.target === this && $(this).hasClass('active')) {
|
||||
if (typeof e.stopPropagation != "undefined") {
|
||||
e.stopPropagation();
|
||||
} else {
|
||||
e.cancelBubble = true;
|
||||
}
|
||||
that.toggle();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
cssAddon: // could also be in a css file instead
|
||||
|
Loading…
x
Reference in New Issue
Block a user