Created
February 8, 2013 01:46
-
-
Save gaina-jp/4735955 to your computer and use it in GitHub Desktop.
スマートフォン用
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
var Zoomer = Zoomer || {}; | |
Zoomer = { | |
docWidth :320, | |
rate :1, | |
isiOs :navigator.userAgent.search(/iPhone|iPod|iPad/) !== -1, | |
isAndroid :navigator.userAgent.search(/Android/) !== -1 | |
}; | |
Zoomer.adjust = function(){ | |
if(Zoomer.isAndroid || Zoomer.isiOs){ | |
$(window).on('load resize', function(){ | |
Zoomer.rate = $(window).width() / Zoomer.docWidth; | |
$('html').css({ | |
zoom :Zoomer.rate | |
}); | |
}); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment