Template:Technion/Javascript
$(document).ready(function() {
var resize_flag; var scroll_flag;
if( $(window).width() < 1000) { resize_flag = 0; } else { resize_flag = 1; }
if (window.scrollY >= 450) { scroll_flag = 1; } else { scroll_flag = 0; }
if ((resize_flag == 1) && (scroll_flag == 1)) { $(".dropdown").show(); } else { $(".dropdown").hide(); }
window.onresize=function() { if( $(window).width() < 1000) { resize_flag = 0; } else { resize_flag = 1; } if ((resize_flag == 1) && (scroll_flag == 1)) { $(".dropdown").show(); } else { $(".dropdown").hide(); } }
window.onscroll=function() { if (window.scrollY >= 450) { scroll_flag = 1; } else { scroll_flag = 0; } if ((resize_flag == 1) && (scroll_flag == 1)) { $(".dropdown").show(); } else { $(".dropdown").hide(); } } });