when i use this address file:///D:/apache-tomcat-6.0.18/webapps/tree/tree.html it works. when i use http://localhost:8080/tree/tree.html it failed.
why ? could you help me? THANK YOU! HTML: <ul class="root" id="0"> <img id="img1" src="img/plus.gif" /><img src="img/folder.gif"/> </ul> custom3.js $(document).ready(function(){ $(".root").toggle(function(){ $("#"+this.id+" > img:first").attr("src","img/minus.gif"); },function(){ $("#"+this.id+" > img:first").attr("src","img/plus.gif"); }); });