开发者

jquery: checking if embedded youtube video is loaded - ready to play?

hey guys, i've a embedded youtube video on my page.

<div class="vidwrapper">
    <object class="video" width="308" height="25"><embed src="http://www.youtube.com/v/GfugtAWxooU?fs=1&amp;hl=de_DE&amp;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="308" height="25" wmode="opaque"></embed></object>
</div>

my .vidwrapper has a green background a开发者_运维知识库nd i can see that background as long as the video is not loaded onto my page.

i wonder how i could check for the moment the video is loaded onto my page?


use load() to ensure the video and wrapper are loaded before displaying on the page. This will prevent the green box from showing while video is loading.

http://api.jquery.com/load-event/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜