I’m using the following color picker and it works fine, but when i click on the color picker icon, i don’t want it to bubble to body. So i tried the following and now the color picker is not working.
Check http://jsfiddle.net/CWGgM/.
If you remove the below code from jsfiddle then it works. What is causing this
$('#test').click(function(e){
e.stopPropagation();
});
It appears to use its own
live()style code, where events are allowed to bubble up and are handled on thedocument.Therefore, the events must propagate to
documentor they won’t work.You could avoid the event triggering on body with the following workaround…
jsFiddle.
Or this might work better with multiple color pickers…
jsFiddle.