How NOT to run js on click on specific element?

Hi all.
I have two units (.wrapper and .other-wrapper). By clicking on .I have a wrapper should appear .other-wrapper.
Question: I have in the unit .wrapper there is a link, how do I make it so that by clicking on it .other-the wrapper did NOT appear, and perform their direct function links.
June 7th 19 at 14:41
2 answers
June 7th 19 at 14:43
Solution
Thanks. - Geovany_Sawayn commented on June 7th 19 at 14:46
June 7th 19 at 14:45
$(document).ready(function(){
 $('.wrapper').on('click', function(e) {
 if (e.target === this)
$('.other-wrapper').slideToggle();
});
});
Not quite the same, now the JS does not work by clicking on all the child elements(in the example .col), and I need only the latest (the link). - Geovany_Sawayn commented on June 7th 19 at 14:48

if (e.target === $(this).find('.col:last a')[0])
So? - Geovany_Sawayn commented on June 7th 19 at 14:51
on the contrary , slideToggle should work by clicking on all except the last link :) - Gonzalo.Hane39 commented on June 7th 19 at 14:54
In your example, my works, click on the link nothing happens and when you click on a other colas triggered the toggle. what's wrong ? - Geovany_Sawayn commented on June 7th 19 at 14:57
, I meant that === - action links, and !== - slideToggle - Sydni_We commented on June 7th 19 at 15:00
, https://jsfiddle.net/be54e91x/1/ try to click on the text column, slideToggle will not work :( - Gonzalo.Hane39 commented on June 7th 19 at 15:03
I realized the perfect solution. Thank you very much. May God give You health! - Geovany_Sawayn commented on June 7th 19 at 15:06

Find more questions by tags JavaScriptHTMLCSSjQuery