mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-20 03:19:13 -04:00
Simplify getViewportSize function to use the jQuery height and width functions
This commit is contained in:
@@ -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();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user