Skip to content

Instantly share code, notes, and snippets.

@adjohu
Created May 17, 2012 17:52
Show Gist options
  • Save adjohu/2720527 to your computer and use it in GitHub Desktop.
Save adjohu/2720527 to your computer and use it in GitHub Desktop.
$(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