There is a menu. When you click it goes down. There is also a div with the class .doc-info . It is necessary to alter the script so that when leaving the menu, in .doc-info padding-top : from 320px changed to 420px , for example. And so that when performing else , the padding back 320px by 320px . That is, the question is how to add padding-top: 420px style padding-top: 420px through JS and remove it when you click padding-top: 420px ? I hope clearly explained.
// TOGGLE MNU MOBILE SANDWICH $(".toggle-mnu").click(function() { $(".sandwich").toggleClass("active"); }); $(".toggle-mnu").click(function() { if ($(".hidden-mnu").is(":visible")) { $(".hidden-mnu").slideUp(); } else { $(".hidden-mnu").slideToggle(); } });
$(".doc-info").css("padding-top", "100px");- Yuri