Merging multiple window events
1. do anyone know the syntax to merge 2 events below for a same function?
$(function(){
$("#nav").hide();
});
$(window).resize(function() {
$("#nav").hide();
});
2. shortcut to write this line:
$(this).css({"position":"relative","top":yP,"left":xP});
thank heaps!