I\'m trying to react to the HTML 5 onended
event for the video
tag without success. In the code snippet below I added the mouseleave event to be s
I was searching for the answer for this too. Here's what worked for me in for the jQuery mobile framework:
$(document).ready(function(){
$("#idname").bind('ended', function(){
$.mobile.changePage($('#idofpageyouwantogoto'), 'fade');
});
});
Make sure you're binding to the ended
event instead of onended
, always leave the on
out when binding with jQuery, for example you couldn't do .on("onclick")
, you'd do .on("click")
.
If it helps, there's a full listing of available events for the <video>
element here: http://www.w3.org/2010/05/video/mediaevents.html