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 MobileDetect = function() { | |
if (navigator.userAgent.match(/Android/i) | |
|| navigator.userAgent.match(/webOS/i) | |
|| navigator.userAgent.match(/iPhone/i) | |
|| navigator.userAgent.match(/iPad/i) | |
|| navigator.userAgent.match(/iPod/i) | |
|| navigator.userAgent.match(/BlackBerry/i) | |
|| navigator.userAgent.match(/Windows Phone/i) | |
){ | |
return true; |
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
Firefox 14.0.1 | |
window.retina => undefined | |
window.devicePixelRatio => undefined | |
Chrome 21.0.1180.57 | |
window.devicePixelRatio => 2 | |
window.retina => undefined | |
Safari 6.0 (8536.25) | |
window.retina => true |
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
function preventMacBackFwdGesture(element, scrollable) { | |
if (scrollable === undefined) { | |
var scrollable = true; | |
}; | |
$(element).each(function () { | |
var $this = $(this); | |
var scrollDirection; | |
$this.mousewheel(function(event, delta, deltaX, deltaY) { | |
if (Math.abs(deltaX) < Math.abs(deltaY)) { | |
scrollDirection = "vertical"; |
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
if($(element).is(':hover')) { do something } | |
function handler( event ) { | |
var target = $( event.target ); | |
} |
NewerOlder