开发者

jQuery youtubin plugin only working with a selector

开发者 https://www.devze.com 2023-01-10 23:00 出处:网络
I\'m using youtubin to embed youtube videos on a secure page.It works whenever I specify a jQuery selector:

I'm using youtubin to embed youtube videos on a secure page. It works whenever I specify a jQuery selector:

<script>
$(function() {
 开发者_JAVA技巧 $('#foo a').youtubin();
});
</script>

<div id="foo">
  <a href="http://www.youtube.com/v/kUini08olkQ&amp;hl=en_US&amp;fs=1">YouTube Video</a>
</div>

It doesn't work when I just call youtubin:

<script>
$(function() {
  $.youtubin();
});
</script>

<div id="foo">
  <a href="http://www.youtube.com/v/kUini08olkQ&amp;hl=en_US&amp;fs=1">YouTube Video</a>
</div>

I'm using jQuery 1.3.2, swfobject 2.2, and youtubin 1.2. Any thoughts on why it only works with a selector? Thanks


Try changing the format of the URL of the Youtube video. Example:

<a href="http://www.youtube.com/watch?v=_c6HsiixFS8">Click here</a>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号