Editing Template:Technion/navbar/javascript
$(document).ready(function() { /************************reset parameters*********************************/ var p = $("#project").offset(); $("#project_Links").css({"padding-left": (p.left-0)});
p = $("#Lab_Notebook").offset(); $("#Lab_Notebook_Links").css({"padding-left": (p.left-0)});
p = $("#Human_Practices").offset(); $("#Human_Practices_Links").css({"padding-left": (p.left-0)});
p = $("#Judging_Criteria").offset(); if (($(window).width())*1.5 >= screen.width) { $("#Judging_Criteria_Links").css({"padding-left": (p.left-0)}); } else { p = $("#Lab_Notebook").offset(); $("#Judging_Criteria_Links").css({"padding-left": (p.left-0)}); }
p = $("#Team").offset(); if (($(window).width())*1.1 >= screen.width) { $("#Team_Links").css({"padding-left": (p.left-0)}); } else { p = $("#project").offset(); $("#Team_Links").css({"padding-left": (p.left-0)}); } /************************reset parameters-end*****************************/
/************************reset parameters on resize***********************/ $(window).resize(function() { var p = $("#project").offset(); $("#project_Links").css({"padding-left": (p.left-0)});
p = $("#Lab_Notebook").offset(); $("#Lab_Notebook_Links").css({"padding-left": (p.left-0)});
p = $("#Human_Practices").offset(); $("#Human_Practices_Links").css({"padding-left": (p.left-0)});
p = $("#Judging_Criteria").offset(); if (($(window).width())*1.3 >= screen.width) { $("#Judging_Criteria_Links").css({"padding-left": (p.left-0)}); } else { p = $("#Lab_Notebook").offset();
$("#Judging_Criteria_Links").css({"padding-left": (p.left-0)});
}
p = $("#Team").offset(); if (($(window).width())*1.1 >= screen.width) { $("#Team_Links").css({"padding-left": (p.left-0)}); } else { p = $("#project").offset(); $("#Team_Links").css({"padding-left": (p.left-0)}); } }); /************************reset parameters on resize-end*******************/
/************************on hover events for main buttons*****************/ $("#project, #project_Links a").hover(function() { $("#project_Links").css({"max-height": "50px"}); }, function() { $("#project_Links").css({"max-height": "0px"}); });
$("#Lab_Notebook, #Lab_Notebook_Links a").hover(function() { $("#Lab_Notebook_Links").css({"max-height": "50px"}); }, function() { $("#Lab_Notebook_Links").css({"max-height": "0px"}); });
$("#Human_Practices, #Human_Practices_Links a").hover(function() { $("#Human_Practices_Links").css({"max-height": "50px"}); }, function() { $("#Human_Practices_Links").css({"max-height": "0px"}); });
$("#Judging_Criteria, #Judging_Criteria_Links a").hover(function() { $("#Judging_Criteria_Links").css({"max-height": "50px"}); }, function() { $("#Judging_Criteria_Links").css({"max-height": "0px"}); });
$("#Team, #Team_Links a").hover(function() { $("#Team_Links").css({"max-height": "50px"}); }, function() { $("#Team_Links").css({"max-height": "0px"}); }); /************************on hover events for main buttons-end*************/
});