0

「フェード」トランジション効果を使用して、jquery Cycle スライドショー プラグインをページに追加しようとしています。しかし、それでも私は仕事をすることができませんでした。

これは私のhtmlです:

<div class="container">
    <div class="slide1">
         <blockquote>
            <span class="leftquotes">&ldquo;</span> He promptly completed the task at hand and communicates really well till the project reaches the finishing line. I was pleased with his creative design and will definitely be hiring him again. <span class="rightquotes">&bdquo; </span>
         </blockquote>
         <img src="images/profile.jpg" width="120" height="100" />
         <h2>Steve Kruger</h2>
         <h6>UI/UX Designer at Woof Design Studio</h6>
         <div class="slide1bottom"></div>
    </div>

    <div class="slide2">
        <blockquote>
            <span class="leftquotes">&ldquo;</span> Till the project reaches the finishing line. I recommend him to anyone who wants their work done professionally. project reaches the finishing line. I recommend him to anyone who wants their work done professionally. The project ... <a href="#"> read more</a><span class="rightquotes">&bdquo; </span>
        </blockquote>
        <img src="images/images.jpg" width="120" height="100" />
        <h2>John Doe</h2>
        <h6>Developer Relations at Woof Studios</h6>
        <div class="slide2bottom"></div>
    </div>

    <div class="slide3">
        <blockquote>
            <span class="leftquotes "> &ldquo;</span> He promptly completed the task at hand and communicates really well till the project reaches the finishing line. I was pleased with his creative design and will definitely be hiring him again. <span class="rightquotes">&bdquo; </span>
        </blockquote>
        <img src="images/summer_school.png" width="120" height="100" />
        <h2>Steve Stevenson</h2>
        <h6>CEO Woof Web Design Studios</h6>
        <div class="slide3bottom"></div>
    </div>  
</div>

これは私の JQuery です:

$(function() {
    $('#container').cycle();
});

JQuery プラグイン、サイクル プラグイン、イージング プラグインをページに適切にインポートしました。

<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/jquery.color.js"></script>
<script type="text/javascript" src="js/jquery.cycle.all.min.js"></script>
<script type="text/javascript" src="jscript/jquery.easing.1.3.js"></script>

これは私のフィドルです: http://jsfiddle.net/kRZ5r/

4

3 に答える 3

1

初期化用に指定したセレクターcycleは、 を探すidべきときに を探していclassます。

$('.container').cycle({
   timeout: 10000
});

ここでフィドル

于 2013-03-10T04:15:27.110 に答える
1

このマークアップがあります:

<div class="container">

それでも、このセレクターを使用します:

$('#container').cycle();

#セレクターに使用されます。セレクターであるidを使用する必要があります。.class

$('.container').cycle();

また、Mr. Alsup が、HTML5 と互換性があり、属性を自動初期化に活用できる、輝かしい新しい更新、Cycle2 ( http://www.malsup.com/jquery/cycle2/data- ) をリリースしたことも注目に値します。

于 2013-03-10T04:16:55.023 に答える