开发者

Full screen jQuery Cycle, resize window

I'm trying to build a sl开发者_运维百科ideshow with jQuery Cycle where the images fills the entire browser, are adjusted so they're always centered and scrolls horizontally (scrollHorz) on click.

It all works pretty good, but when I adjust browser window size, the scroll distance is not adjusted according to the scaling of the image.

Can such adjustment be accomplished? Here's my source code: http://jsfiddle.net/taifun/GWrbB/

I know I can fix scaling of current image by using the $(window).resize event but that's not the problem.

Any suggestions will be appreciated.


Take a look at Maximage 2.0… it uses jQuery Cycle plugin to create fullscreen background slideshows. Looks like it does what you are looking for.

http://www.aaronvanderzwan.com/blog/2011/11/maximage-2-0-beta1-release/


You need to adjust the scroll distance (left or margin-left) based on the screen width after resize. I am not sure what attribute cycle uses to do this. Much like you are resize the image after resize you'll also need to set the start position.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜