Monday, May 14, 2012

make sure img div loads before video div

I have a page where when you click one out of a set of buttons, and image pops up and then fades as a video plays. The problem is that it works on the first click, but on the second on, the div with the image loads after the video loads. How can I make sure it appears before the video starts to load? the script (simplified) is



$('li, .thumbs').on('click', function() {
myVideo.load();
myVideo.play();
$('#myVid').bind("loadstart", function() {
$('#MyT').fadeIn(0);
});
$('#myVid').bind("playing", function() {
$('#MyT').fadeOut(500);
});
});?




No comments:

Post a Comment