I do have the following click function on a div element. Inside the div element are links. How can I stop the click function on this links? I tried z-index but it doesn't work.避免jQuery的點擊功能上<a href=""> elements
$('.thumb.flip').click(function() {
if ($(this).find('.thumb-wrapper').hasClass('flipIt')) {
$(this).find('.thumb-wrapper').removeClass('flipIt');
} else {
$(this).find('.thumb-wrapper').addClass('flipIt');
}
});
這已經回答了:http://stackoverflow.com/questions/5085584/disable-a-hyperlink-using-jquery – Niklas