-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscript.js
1 lines (1 loc) · 1.64 KB
/
script.js
1
$(function(){$('a[href*="#"]:not([href="#"])').click(function(){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var a=$(this.hash);if(a=a.length?a:$("[name="+this.hash.slice(1)+"]"),a.length)return $("html, body").animate({scrollTop:a.offset().top},1e3),!1}})}),$(window).on("scroll",function(){$(".about").each(function(){var a=$(this)[0];a.getBoundingClientRect().top<=$(window).height()/2&&$(this).find(".rightside").css("right","0").css("opacity","1").parent().find(".leftside").css("left","0").css("opacity","1")}),$(".faculty").each(function(){var a=$(this)[0];a.getBoundingClientRect().top<=$(window).height()/2&&$(this).find(".inner").css("top","0").css("opacity","1")}),$(".faculty").each(function(){var a=$(this)[0];a.getBoundingClientRect().top<=$(window).height()/2&&$(this).find(".fac").css("top","0").css("opacity","1")}),$(".team").each(function(){var a=$(this)[0];a.getBoundingClientRect().top<=$(window).height()/2&&$(a).find(".inner1").css("bottom","0").css("opacity","1")}),$(".team").each(function(){var a=$(this)[0];a.getBoundingClientRect().top<=$(window).height()/2&&$(a).find("li").css("bottom","0").css("opacity","1")}),$(".alumni").each(function(){var a=$(this)[0];a.getBoundingClientRect().top<=$(window).height()/2&&$(a).find(".inner1").css("bottom","0").css("opacity","1")}),$(".alumni").each(function(){var a=$(this)[0];a.getBoundingClientRect().top<=$(window).height()/2&&$(a).find("div").css("bottom","0").css("opacity","1")}),$(".contact").each(function(){var a=$(this)[0];a.getBoundingClientRect().top<=$(window).height()/2&&$(a).find("span").css("bottom","0").css("opacity","1")})});