diff options
-rwxr-xr-x | HISTORY | 2 | ||||
-rw-r--r-- | index.php | 2 | ||||
-rw-r--r-- | js/functions.js | 20 |
3 files changed, 22 insertions, 2 deletions
@@ -1,7 +1,7 @@ iStreamdev History ------------------ -03.29.2010 - 0.1.0 +03.29.2010 - 1.0.0 - Massive rework from scratch - Now based on JQuery/JQTouch @@ -15,7 +15,7 @@ if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandl <link rel="stylesheet" href="min/?b=css&f=jqtouch.css,theme.css,istreamdev.css,spinningwheel.css" type="text/css" media="screen" /> <script src="min/?b=js&f=jquery-1.4.2.min.js,jqtouch.js,jqtouch.transitions.js,functions.js,spinningwheel.js,jquery.scrollTo-1.4.2.js,istreamdev.js" type="text/javascript" charset="utf-8"></script> </head> - <body> + <body onorientationchange=\"updateOrientation();\"> <div id="loader"></div> <div id="status_box"></div> <div id="jqt"> diff --git a/js/functions.js b/js/functions.js index f628142..2ea12d6 100644 --- a/js/functions.js +++ b/js/functions.js @@ -120,3 +120,23 @@ function str_pad (input, pad_length, pad_string, pad_type) { return input;
}
+
+function updateOrientation() {
+ switch(window.orientation) {
+ case 0:
+ orient = "portrait";
+ break;
+ case -90:
+ orient = "landscape";
+ break;
+ case 90:
+ orient = "landscape";
+ break;
+ case 180:
+ orient = "portrait";
+ break;
+ }
+ document.body.setAttribute("orient", orient);
+ window.scrollTo(0, 1);
+
+}
\ No newline at end of file |