$(function(){ $(".arrow-down").click(function(){ var classname = $(this).attr("class"); console.log(classname); if(classname=='arrow-down'){ $(this).attr("class","arrow-up"); }else{ $(this).attr("class","arrow-down"); } $(".nav-submenu").toggle("fast","linear"); }); $(".menu-icon").click(function(){ var displayattr = $("#topNavigation").css("display"); if(displayattr=='none'){ $("#topNavigation").show().removeClass("animate__slideOutLeft").addClass("animate__slideInLeft"); }else{ $("#topNavigation").removeClass("animate__slideInLeft").addClass("animate__slideOutLeft").delay(200).slideUp(); } }); // fix juz height / $(".square-1").height($("#fixheight").height()); $(".index-news-title > div").click(function(){ var _index = $(this).index(); var ind = _index + 1; if(ind==1) _left = "0"; else if(ind==2) _left = "33%"; else if(ind==3) _left = "66%"; else _left = "0"; $(".news-active-line").css("margin-left", _left); var obc = $(".index-news-content > div.index-news-block"); obc.removeClass("active").hide().delay(800); obc.eq(_index).show().addClass("active"); }); //back $(".back-icon").click(function(){ history.back(); }); });