wycats wrote: > > Is there a jQuery way to get the window size cross-platform, or should I > be > using the algorithm at: >
I stripped the code used to get the window height from the dimensions plugin & created a very small extension reminiscent of Klaus's old function; $.viewportHeight = function() { return self.innerHeight || jQuery.boxModel && document.documentElement.clientHeight || document.body.clientHeight; }; You can poke around the dimensions.js to extract the bits you need (as including the entire plugin is rather inefficient if you're only using features). Well.. not really.. but it did cause an incosistency which made me stop using it. It returned the height of $('body').height() with the "px" suffix -- e.g. "332px". This caused all my height comparissons to go bonkers & so I decided to strip out all I didn't need ;) ~ Brice -- View this message in context: http://www.nabble.com/Window-Size-tf2740891.html#a7656611 Sent from the JQuery mailing list archive at Nabble.com. _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/