Simplify getViewportSize function to use the jQuery height and width functions

This commit is contained in:
Tim Almdal
2009-07-31 05:27:53 -07:00
parent 7aa03e59ba
commit 0a2da7731a

View File

@@ -33,14 +33,10 @@
$.getViewportSize = function() {
return {
width : function() {
return window.innerWidth
|| document.documentElement && document.documentElement.clientWidth
|| document.body.clientWidth;
return $(window).width();
},
height : function() {
return window.innerHeight
|| document.documentElement && document.documentElement.clientHeight
|| document.body.clientHeight;
return $(window).height();
}
};
};