I have the following div:
<div class='amazingmenu' id='menupull'>
<img src='images/down.png' width=20 height=20 align='right'/>
<div id='menupullhideme'>click the arrow to read the rest!<br /></div>
more jokes on <a href='http://www.amazingjokes.com'>amazingjokes.com</a>
</div>
clicking the DIV or the image should execture some function in jQuery:
$('#menupull').click( function() {
alert( 'pullmenu clicked' );
});
I want to make it so that it only alerts the message when I click the DIV or the image, but not the link. Tried this:
$('#menupull:not(a)').click( function() {...
but that didn't work. Any ideas?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…