Created
May 17, 2012 17:52
-
-
Save adjohu/2720527 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 fixSliderPosition = function() { | |
var slider = $("#qContent"); | |
if (!slider.length) { | |
setTimeout(doStuff, 200); | |
return; | |
} | |
slider.show(); | |
slider.height(110); | |
setInterval(function() { | |
var top = ($(window).scrollTop() + $(window).height()) - slider.height() +40; | |
if($(window).scrollTop() < 30 ) { | |
top -= 40; | |
} | |
slider.css("top", top); | |
}, 10); | |
} | |
fixSliderPosition(); | |
})(); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment