Custom link on embedded youtube video

Posted by 0plus1 on Stack Overflow See other posts from Stack Overflow or by 0plus1
Published on 2010-06-14T15:20:07Z Indexed on 2010/06/14 15:22 UTC
Read the original article Hit count: 196

Filed under:
|
|
|
|

I'm looking to direct the user on the channell webpage instead of the video url that I'm embedding. I've read the api and I didn't see any way to achieve this. I tried enclosing the embedded video in a and I added this code:

$('#youtube').click(function() {
    document.write('http://www.youtube.com/user/trasportareoggi');
    return false;
});

And surprise it won't work.

How, if it's even possible I can do this?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery