How to check if an item inside jCarousel clip is in the viewable clip area?
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/
精彩评论