Jquery Height Q
Jquery Height Q
Out of context: Reply #4
- Started
- Last post
- 8 Responses
- ESKEMA0
sorry to bother, just want to know if what I have can be optimized somehow in a more streamlined version.
$(window).load(function() {
if ($(window).height() < 700){
$('#container').css("position", "absolute");
}
});$(window).resize(function() {
if ($(window).height() < 700){
$('#container').css("position", "absolute");
}
else { $('#container').css("position", "fixed");
}
});Thanks again!