【问题标题】:jQuery - cycle helpjQuery - 循环帮助
【发布时间】:2010-09-23 04:38:20
【问题描述】:

我正在寻求有关使用 jQuery 的 cycle 库的帮助。我在beginner 演示中,我完成了绝对的第一个演示。这是页面上的第二个。

<script src="jquery-1.2.6.min.js" type="text/javascript"></script>
<script src="jquery.cycle.all.min.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function() {

    $('.pics').cycle({
        fx:      'scrollDown',
        speed:    300,
        timeout:  2000
    });
</script>

我的 CSS 与页面上的相同,这就是我将 .pics 放在引号中的原因。

【问题讨论】:

  • 如果您告诉我们您的问题是什么,我们会有所帮助。

标签: jquery slideshow cycle


【解决方案1】:

可以重新打开这个问题吗?它工作正常,但我很难设计这个。我正在尝试使图像向左浮动,并且文本像demo 一样向右环绕它(非图像内容)。

我的脚本是:

<script type="text/javascript">

$(document).ready(function() {
    $('.text')
    .before('<div id="slidenav">')
    .cycle({
        fx:     'fade',
        speed:  'slow',
        timeout: 6000,
        pager:  '#slidenav',
       pause: 1
    });
});

</script>

...

<div id="featured">
    <div class="text">
        <txp:article_custom form="slidetext" section="slide" limit="5" />
    </div>
</div>

我的 CSS 是:

.text { width: 600px; height: 200px; border: 1px solid #ddd; background-color: green; }
.text div { width: 500px; height: 200px; padding: 15px; color: #333; text-align: left; font-size: 16px; background-color:red; }
.text div img {width: 200px; height: 200px; padding: 3px; background: orange }
.text div p{ background-color:black;}

抱歉,这里没有浮动属性,因为它们都没有工作。我从 jQuery 循环演示页面中抓取了那个 CSS。

结果是

http://img147.imageshack.us/img147/4434/jqueryhelpdl5.jpg http://img147.imageshack.us/img147/4434/jqueryhelpdl5.jpg

http://img147.imageshack.us/img147/4434/jqueryhelpdl5.jpg

【讨论】:

    【解决方案2】:

    我猜这对你不起作用。
    您需要平衡大括号和括号。
    帮助其他人帮助您,说明下一次的实际问题是什么。

    试试这个:

    $(document).ready(function() { 
        $('.pics').cycle({  
            fx: 'scrollDown',     
            speed: 300,     
            timeout: 2000 
        });
    });
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-09-16
      • 1970-01-01
      • 2011-07-24
      • 1970-01-01
      • 2010-09-26
      • 1970-01-01
      • 1970-01-01
      • 2018-12-21
      相关资源
      最近更新 更多