Clickable parent DIV to show and hide children DIV has problems in jQuery?

You need to stop the click on cancel from bubbling up and also being a click on wrapper by using stopPropagation() like this.

You need to stop the click on . Cancel from bubbling up and also being a click on . Wrapper by using .stopPropagation(), like this: $('.

Cancel'). Live("click", function(e){ $('. Inner1').show(); $('.

Inner2').hide(); e.stopPropagation(); }); You can test it out here. What's currently happening is you are hiding it, but then the . Wrapper click handler gets the click and immediately shows .

Inner2 again.

Oh man thanks for the help! Now I get it! – Scott Oct 22 '10 at 9:52 @Scott - welcome!

:) – Nick Craver? Oct 22 '10 at 10:03 after some further thought, I decided just to make inner divs clickable instead. Having the main div clickable presents so many challenges now that you have explained to me what's happening.

Thanks for sharing. – Scott Oct 22 '10 at 10:03 @Scott - that sounds like a better solution to me as well, cheers on getting it the way you wanted :) – Nick Craver? Oct 22 '10 at 10:05.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions


Thank You!
send