javascript - Html nested element remove class -
html
<li id="tree0_2_2" data-rowkey="0_2_2"> <span> <span></span> <span></span> <span class="ui-state-highlight">something</span> </span> </li>
jquery
var removednode = $('#tree0_2_2'); $(removednode.find(".ui-state-highlight")).removeclass('.ui-state-highlight');
i tried didin't worked.
how can remove class 'ui-state-higlight' ?
you missed closing quote , remove .
removeclass
var removednode = $('#tree0_2_2'); removednode.find(".ui-state-highlight").removeclass('ui-state-highlight');
removednode jquery object , not need pass $()
again. can reduce single statement.
$('#tree0_2_2 .ui-state-highlight').removeclass('ui-state-highlight');
Comments
Post a Comment