I have a critical problem that is my jquery plugins have call backs when I clicked on the elements the callbacks should be called.
I was observed that click event triggering more than one time for that I put unbind working some items well, but some items are not triggering callbacks.
$(this).children('li').unbind('click').click(function(){
switch(this.id){
case 'foo' : options.foocallback();
break;
case 'bla' : options.blacallback();
break;
.....
}
});
HTML:
<ul>
<li id="foo">...</li>
<li id="bla">...</li>
...
</ul>
now when I click on list items some working fine and calling callbacks
** But some items are not calling the callbacks**
You can try something like this (if your event binding don’t depend on some conditions)
HTML
jQuery