开发者

jQuery UI tabs not working with jwplayer javascript

开发者 https://www.devze.com 2023-03-18 14:23 出处:网络
http://www.lifeisartphoto.com/player/ I\'m trying to make a simple html5-friendly video/photo gallery that uses tabs from the jQuery UI.Videos are always displayed in Tab#1 while photos are each dis

http://www.lifeisartphoto.com/player/

I'm trying to make a simple html5-friendly video/photo gallery that uses tabs from the jQuery UI. Videos are always displayed in Tab#1 while photos are each displayed in subsequent tabs (if there are 3 photos, they are using Tab#2, Tab#3 and Tab#4). Thumbnails for each video/photo are displayed below the tabs and control navigating through them.

Videos are all in their own tab because I'm using jw player and don't want to output multiple players if it's unnecessary. So I've added onclick to each video thumbnail, which controls changing and playing the jwplayer through javascript.

The only problem is, using <a href="#tab-1" onclick="jwplayer-javascript">thumbnail</a> doesn't seem to work - it's like the href is interfering with the onclick javascript.

To replicate this issue: visit this page with the gallery: http://www.lifeisartphoto.com/player/ The first video will load (it can be slow at times) Click on any of the photo thumbnails Click back to the second video (second thumbnail) - it loads the first video! If you click on it again, it will then load the correct video.

I guess I have a problem with changing tabs and trying to run some jwplayer javascript at the s开发者_开发问答ame time - is there any way to get it to work so the videos load properly while only having to select them once?


your script seem to work fine in Chrome. In FF 5 I was able to replicate the issue.

Have you tried:

  • using the latest Jquery library or
  • putting the onClick code in a jqueryish $('#node').click(); event ?

Sorry thats all I know...

0

精彩评论

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