2012-07-20 72 views
0

我正在使用jQuery Cycle,但它自动设置div的宽度。jquery循环:重写宽度?

是循环的div有ID #slideshow,所以我目前不必修改CSS

#slideshow { 
    width: 100% !important; 
} 

有没有办法做到这一点使用jQuery循环选择,而不必使用!重要。

任何提示将不胜感激!

+0

我从来没有使用的插件,但快速搜索落在我的[jQuery的周期插件选项(http://jquery.malsup.com/cycle/options.html)页面,其中包含宽度和适合度等内容。你使用什么选项与插件? – MrOBrian 2012-07-20 16:39:43

回答

2

set width option as

width: "100%" // container width (if the 'fit' option is true, the slides will be set to this width as well) 
+0

我想你忘了把“”作为宽度:“100%” – 2012-07-20 16:44:50

+0

ahhh的报价!它做到了:)谢谢你们! – tonic 2012-07-26 21:44:21

+0

你可以编辑它来添加引号,所以我可以“绿色检查”它吗? – tonic 2012-07-26 21:45:00