diff options
author | Alib <aliboba@free.fr> | 2010-03-29 21:33:44 +0200 |
---|---|---|
committer | Alib <aliboba@free.fr> | 2010-03-29 21:33:44 +0200 |
commit | 975b28552b104962598ea484d0bf6b11fdd1f6aa (patch) | |
tree | 2fedbcafe24a8c37a53be8f203c1de0d610384b4 /js/functions.js | |
parent | 80b1c4ce5fd04e5d9caf4c1cc0bf12fcc9d1e115 (diff) | |
download | istreamdev-975b28552b104962598ea484d0bf6b11fdd1f6aa.tar.gz istreamdev-975b28552b104962598ea484d0bf6b11fdd1f6aa.tar.bz2 |
fixed version in history
Diffstat (limited to 'js/functions.js')
-rw-r--r-- | js/functions.js | 20 |
1 files changed, 20 insertions, 0 deletions
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 |