Last active
October 26, 2018 06:31
-
-
Save mardianto/8989d0c4062df4ec3593f45e7817110c to your computer and use it in GitHub Desktop.
hide and show
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Brambles.com | |
$(".link-dropdown").on("click", function () { | |
$(this).parents("li").find(".dropdown-nav").slideToggle("slow"); | |
$(this).find('i').toggleClass('fa-angle-down fa-angle-up'); | |
}); | |
$("body").on("click", ".icon-showhide", function () { | |
$(this).parents("#boxdropdown-footer").find(".footer-link").toggle("slow"); | |
$(this).find("i").toggleClass("icon-plus icon-minus"); | |
}); | |
function checkPosition() { | |
if (window.matchMedia('(min-width: 760px)').matches) { | |
//Stytax Dekstop | |
$(".footer-link").css("display", "block"); | |
} else { | |
$(".footer-link").css("display", "none"); | |
} | |
} | |
$(window).resize(function () { | |
checkPosition(); | |
}); | |
$("li.search > a", this).on("click", function (e) { | |
e.preventDefault(); | |
$(".top-search").slideToggle("4000"); | |
$(this).find('i').toggleClass('fa-times'); | |
}); | |
$(".has-drop").find('#btnshow-angle-down').click(function () { | |
$(this).toggleClass('fa-angle-down fa-angle-up'); | |
}); | |
$(document).ready(function () { | |
$('.scrolldown-arrow').on('click', function (e) { | |
console.log('work'); | |
e.preventDefault(); | |
$('html, body').animate({ scrollTop: $(this).offset().top }, 500, 'linear'); | |
}); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment