[jQuery] Re: Can the click() function be used in an if statement

2009-05-26 Thread Martin
Got it working thanks yang.. Merely did.. $("#accountButtons div.question b").click(function(e){ Do B e.stopPropagation(); }); That fixed the problem so event A isnt fired... On May 26, 12:08 pm, Steven Yang wrote: > how do you click A and invoke B's onclick?the only way is A is B's chi

[jQuery] Re: Can the click() function be used in an if statement

2009-05-26 Thread Martin
Yes, basically I have #accountButtons div.question and #accountButtons div.question b The second element is an "X" over the background image on the first element. I want either element to be exclusively selected when clicked, but when I use the following code, both elements are hit when you c

[jQuery] Re: Can the click() function be used in an if statement

2009-05-26 Thread Steven Yang
how do you click A and invoke B's onclick?the only way is A is B's child. as far as i can think and if thats the case you have event bubbling you can stop this by calling event.stopPropagation()