That I got no idea how. I need a function that the window height or the monitor configuration is larger than 1200, put a div position top = 1000px and else put in another position top = 800px
+1
A:
Like this:
if ($(window).height() > 1200) {
el.css('top', 1000);
} else {
el.css('top', 800);
}
Improved version, should work in IE:
if ((window.innerHeight||document.body.clientHeight) > 1200) {
el.css('top', 1000);
} else {
el.css('top', 800);
}
edwin
2010-05-10 19:32:28
work fine in FF and Safary, but don't work in IE.
Mango
2010-05-10 20:05:03
+1
A:
Try the following: http://jsbin.com/igoxu3/edit
(And while this is not the most consolidated code, I thought breaking it out would be good for illustration.)
Lance May
2010-05-10 19:50:24