Created
October 10, 2012 20:58
-
-
Save thelinuxlich/3868370 to your computer and use it in GitHub Desktop.
script.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
$.stayInWebApp(); | |
function reorient(e) { | |
var landscape = (window.orientation % 180 == 90); | |
$("body > div").css("-webkit-transform", !landscape ? "rotate(90deg)" : "") | |
.css("-webkit-transform-origin", "512px 512px"); | |
} | |
window.onorientationchange = reorient; | |
window.setTimeout(reorient, 0); | |
function reorient2(e) { | |
var landscape2 = (window.orientation % -180 == -90); | |
$("body > div").css("-webkit-transform", !landscape2 ? "rotate(-90deg)" : "") | |
.css("-webkit-transform-origin", "512px 512px"); | |
} | |
window.onorientationchange = reorient2; | |
window.setTimeout(reorient2, 0); | |
$('#swiper').on({ | |
'swiperight' : function(ev) { | |
window.location.href = 'slide1.html'; | |
}, | |
'swipeleft' : function(ev) { | |
window.location.href = 'slide2.html'; | |
}, | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment