Q:

Can jQuery listen to a click event on a youtube / vimeo movie?

I have a jQuery slider filled with movies and I would like jQuery to stop the slider on a click event for either the embed / object. I have tried to no avail to get this to work. I have tried this:
$("embed").click(function() {
alert('Handler for .click() called.');   
})

$("object").click(function() {
alert('Handler for .click() called.');   
})

Neither works for the HTML tags embed or object. Any suggestions?

A:

Enable the youtube player like so:
http://www.youtube.com/v/VIDEO_ID?enablejsapi=1&version=3
Then you can use these operations and listen to and react to events such as "onStateChange"

