There is a container that should appear at the click of a button. I wrote such code and everything seems to be fine, everything works, but one thing is “But.” When clicked, flips to the top of the page. Is it even legal?
$('.price .table__container').hide(); $(".btn-green").click(function(){ $(this).next(".table__container").slideToggle(500); $(this).toggleClass("activeBtn"); });