开发者

jQuery.fracs and custom viewport

I'm playing with the very nice jQuery plugin Fracs but I'm in front of one problem.

开发者_Python百科Actually I've a wrapper that include two divs, one for the thumbs and another one for the big images. Example available over there.

My idea is to know which big images is visible the de container to add a select class to the thumb and move the cursor on the thumbs timeline.

So, for me, the viewport should be the .wrapper and no the whole document, is it possible with jQuery.Fracs to specify the element that calculate the viewport or somebody has another idea ?

Thanks,


Finally the problem was simple to resolve, I just need to see closer the plugin.

To fix it, you have some helpers.

var Rect = jQuery.fracs.rect('#parent'); this will return a Rect object that is necessary for the next method var Fracs = jQuery.fracs.fracs('#parent .children', Rect); this method will return a Fracs object with all informations you need to know if you element is visible in the new Viewport or not.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜