Event click on youtube API

Posted by Youss on Stack Overflow See other posts from Stack Overflow or by Youss
Published on 2012-11-10T10:37:20Z Indexed on 2012/11/10 11:00 UTC
Read the original article Hit count: 166

I'm working with Youtube API and Jquery. With a certain script I can get Youtube Feeds as an image, take a look at the example: JsFiddle

I'm trying to do a Jquery click event which will have to invoke another script called 'embedly' like this:

$("a").click(function(event) {
    event.preventDefault();
    $(this).embedly({
    chars: 220,
    nostyle: true,
    key:':41f042ec20b04dda84448dc4a46d357d'
}); 
}); 

It doesn't seem to work. When I do this from my desktop the click does not invoke the embedly part and also goes to the url regardless of the prevent default.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery