1 2 3 4 5 6 7 8
$(document).ready(function() { if (mobile == false) $("body").append(newElementUp + newElementDown); $(".spoiler").each(function(i,v) { $(this).on("click", function() { $(this).find(".content").toggle(300); }); }); });