i use jquery treeview http://docs.jquery.com/Plugins/Treeview/treeview
i want to catch click on text node and do something i use such code
$('li').live('click', function(){ ale开发者_开发百科rt(this.id); return false; });
but if i click on '+' it calls my js code, and then node expand. how can i blocked to call my js code? i know about call e.stopImmediatePropagation(); but how can i use it here?
Try this
$('li').live('click', function(event){
event.stopPropagation();
alert(this.id);
return false; });
If you are still choosing tools for your task, you should try jsTree, a jQuery plugin with plenty of resources and configuration options.
精彩评论