Execute an event when everything is clicked except one element?

$('. Lightbox-con'). Click(function(){ //your code to close it }); $('.

Arrow'). Click(function(event){ //your code for moving forward back event.stopPropagation(); //this will do the trick, it wil just execute arrow code and stop others }) I hope this helps.

Thanks, exactly what I need :-) – jilseego Aug 19 '11 at 11:16.

This solution uses one click event jsfiddle.net/VKBdV/ $('. Lightbox-con'). Click(function(e){ var $target = $(e.

Target); if($target. HasClass("arrow")) { event.stopPropagation(); } else { $(this).remove(); } }).

You can use event.stopPropagation() as long as its not a . Live event. Live events do not allow for stopping propagation, if you need to use a live event there are other ways around it, just let me know if thats a requirement.

Example: jsfiddle.net/HenryGarle/y2LwH/2/ $('. Lightbox-con'). Click(function(){ $('.

Lightbox-con').remove(); }); $('. Arrow', '. Lightbox-con').

Click(function (e) { e.stopPropagation(); }).

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