Hi,
I have a script that changes a div's positioning property from static
to fixed
when the scroll bar reaches it. (example - you'll see the floating video in the right column).
If you look at the example, when you scroll down the - the video div ("#membership") scrolls down the page with the rest of the content.
Here's the script that does that:
$(window).scroll(
function ()
{
if($(window).scrollTop() > 157){
$("#membership").css("position", "fixed");
var marginTop = $("#headerWrap").height();
$("#membership").css("top", "40px");
}else{
$("#membership").css("position", "static");
}
}
);
Here is the JW player object:
To summarize: When I change the containing div's position property to position: fixed
, the JW player resets. I have no clue how to even attempt to debug this. It works fine in Chrome for OSX/Windows and interestingly enough Safari 3.
One observation that may or may not help - the whole video blinks and appears to reload when the position property is changed.