Created
September 21, 2011 09:14
-
-
Save adeolaawoyemi/1231640 to your computer and use it in GitHub Desktop.
wait for jQuery before using it to bind
This file contains hidden or 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
var bindTimer = setInterval(function() { | |
if ("undefined" != typeof jQuery && isMobileDevice) { | |
$('.myclass').bind('click', clickHandlerToMobilePage); | |
clearTimeout(bindTimer); | |
} | |
}, 50); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$(document).ready(function() {
//Global function that will detect what device the page is being viewed on
function globalDetectDevice() {
var deviceIphone = "iphone" ;
var deviceIpod = "ipod" ;
var deviceAndroid = "android" ;
//Initialize our user agent string to lower case.
var uagent = navigator.userAgent.toLowerCase() ;
}