Start animation after anoteh function is ended

Hi. I use the following function for a full screen video background:


  $('.video-background').videobackground({
    videoSource: [
      ['video/porsche.mp4',  'video/mp4'],
      ['video/porsche.webm', 'video/webm'],
      ['video/porsche.ogv',  'video/ogg']
    ],
    poster: 'video/porsche.jpg',
    loadedCallback: function() {
      $(this).videobackground('mute');
			
    }
  });

What I would like is the following animation to be executed when the videobackground is finished:


$("#header").animate({top: '+=70'}, 900, 'easeOutBounce');

How can I do so?

Thank you in advance

Which jquery plugin are you using? there’s no way to say without knowing what the plugin is doing.

You would need the plugin to support an ‘ended’ callback which you can hook into.
For HTML5 you could listen to the ‘ended’ event on the <video> element, but the plugin probably has a flash fallback so you would need to use a plugin that fires that callback for all versions of the player.

Hi Mark. I am using the jquery-videobackground plugin from George Paterson. I am not a very specialized jQuery user so I don’t know where to look at when you say:

You would need the plugin to support an ‘ended’ callback which you can hook into.

I hope you can see what is possible and what not