$(".js-toggle").on("click", function(event){
var el = $(this).attr("data-toggle");
$(this).toggleClass("is-active");
$("."+el).toggleClass("is-active");
event.stopPropagation();
return false;
});
$(".js-toggle-el").on("click", function(event){
event.stopPropagation();
});
2 Responses
Write a comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.