Simplify getViewportSize function to use the jQuery height and width functions

Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
This commit is contained in:
Tim Almdal
2009-07-31 20:47:33 +08:00
parent 64aa96b552
commit 86c7fabeaf
+2 -6
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();
}
};
};