Best way to ignore less specific click event with jquery?
Posted
by acidzombie24
on Stack Overflow
See other posts from Stack Overflow
or by acidzombie24
Published on 2010-04-20T21:57:43Z
Indexed on
2010/04/20
22:03 UTC
Read the original article
Hit count: 123
jQuery
I have the code below. The main code is in the 2nd function however the first is called which is interfering with the more specific a.One code.
Whats the best way to not run code in the first function if the div i click is a .main .a.One event?
$('.main .a').live('click', function () {
alert('first');
//2 lines of code
});
$('.main .a.One').live('click', function () {
alert('second');
//lots of logic
});
© Stack Overflow or respective owner