I have a html video, and I am wanting to run a function when a video ends. I have tried the following but I get nothing:
$(document).ready(function(){
$('video').live('ended',function(){
alert('video ended');
});
});
Any ideas why this isn't triggering at the end of a video? Or have I not provided enough information to answer anything here?
Note: I'm using live() function and not on() because of the need for jQuery 1.7 with this project.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…