I have a tree of divs:
<div id="a" onclick="func">
<div id="b" onclick="func">
<div id="c" onclick="func">
</div>
</div>
</div>
When a click is made on a div it makes it's children invisible - ie click on "a" will turn "b" and "c" invisible.
function func{
if ($(childId).hasClass("visible")){
$(childId).removeClass("visible");
$(childId).addClass("invisible");
}
The problem is: a click on "b" will call "a"'s click and make "b" and "c" invisible. How do I disable the click on "a" using jQuery?
thanks
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…