开发者

jQuery cycle: how is wrapper width calculated?

I've implemented a cycle effect like the one seen here. In that demo the plugin adds the following inline css on the div that contains the sliding elements:

overflow: hidden; position: relative;

On my page however it adds this css:

overflow: hidden; position: relative; width: 302px; height: 414px;

Because of this, part of the content of the sliding div is obscured / invisible. How does the plugin calculate this width of 302px and how can I alter it?

My test page can be seen here and the issue is that the right gray bord开发者_StackOverflow社区er when mouseovering the center images does not appear in some browsers. It is obscured by the #slider div. I'm making ongoing changes to this so things may look a little weird

EDIT: I managed to fix it with the JS below but am still interested in getting this question answered

$("#slider").css('width', "420px");


I just ran into the same problem. If you just need a fixed width, add the following options to the cycle() call:

width:530,
fit:true
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜