Created
May 18, 2012 09:02
-
-
Save adjohu/2724099 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
$(function(){ | |
(function() { | |
var isMobile = function() { | |
return navigator.userAgent.search(/iphone|ipod|ipad|android/i) > -1; | |
}; | |
var fixSliderPosition = function() { | |
var slider = $("#qContent"); | |
if (!slider.length) { | |
setTimeout(fixSliderPosition, 200); | |
return; | |
} | |
slider.show(); | |
slider.height(110); | |
setInterval(function() { | |
var top = ($(window).scrollTop() + $(window).height()) - slider.height() +40; | |
slider.css("top", top); | |
}, 10); | |
} | |
if (isMobile()) { | |
fixSliderPosition(); | |
} | |
})(); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment