开发者

How to check if an item inside jCarousel clip is in the viewable clip area?

开发者 https://www.devze.com 2023-01-31 09:58 出处:网络
Hi I have a jCarousel that has 10 items, and the clip only shows 3 items. I want to check if a certain item that has a specific class myItem is in the clip view or hidden outside the clip.

Hi I have a jCarousel that has 10 items, and the clip only shows 3 items.

I want to check if a certain item that has a specific class myItem is in the clip view or hidden outside the clip.

I tried to use if ($(开发者_运维百科'.myItem:visible').length == 0) {} but apparently this doesn't work.

Is there a way to do that?


you could use the itemVisibleInCallback which is called when an item becomes visible. here's a little example: http://www.jsfiddle.net/vTSh2/2/

0

精彩评论

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

关注公众号