Skip to content

Commit

Permalink
Simplify getViewportSize function to use the jQuery height and width …
Browse files Browse the repository at this point in the history
…functions

Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
  • Loading branch information
Tim Almdal committed Jul 31, 2009
1 parent 64aa96b commit 86c7fab
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/gallery.common.js
Expand Up @@ -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();
}
};
};
Expand Down

0 comments on commit 86c7fab

Please sign in to comment.