You need to put the code inside a "doc ready" handler.  In general, you
*always* do this with jQuery code that manipulates elements in the document:

$(document).ready(function() {
    $('#s2').cycle({
       fx:     'fade',
       speed:  'normal',
       timeout: 4000,
       next:   '#next2',
       prev:   '#prev2'
    });
});

Also you should remove all those extra scrip tags.  Load jQuery once.  Load
Cycle once. And if you're using the cycle "all" plugin then you don't need
the "trans" file.

Cheers!

Mike


On Jan 24, 2008 8:41 AM, visitorQ <[EMAIL PROTECTED]> wrote:

>
> hello all. i'm having trouble implementing something from the jQuery
> Cycle plugin that can be found here:
> http://www.malsup.com/jquery/cycle/download.html
>
> the effect i'm looking to implement can be found here:
> http://www.malsup.com/jquery/cycle/int2.html
>
> it's the Prev/Next effect. the second demo on that page. i just can't
> figure out how to get it to work. first i couldn't figure out where to
> put the image gallery or what div tags to use and everything because i
> couldn't find an explaination. then i looked at the source code and
> found it. so i used it but it didn't work =\. what do you guys think?
>
>
> <script type="text/javascript" src="jquery-1.1.2.js"></script>
> <script type="text/javascript" src="jquery-1.2.2.js"></script>
> <script type="text/javascript" src="jquery.cycle.all.js"></script>
> <script type="text/javascript" src="jquery.cycle.all.js?v2.09"></
> script>
> <script type="text/javascript" src="jquery.cycle.trans.js?v2.07"></
> script>
> <script type="text/javascript" src="jquery.easing.1.3.js"></script>
>
> <script type="text/javascript">
> $('#s2').cycle({
>    fx:     'fade',
>    speed:  'normal',
>    timeout: 4000,
>    next:   '#next2',
>    prev:   '#prev2'
> });
> </script>
>
>        <div id="s2" class="pics">
>            <img src="images/onelucky.jpg" width="200" height="200" />
>            <img src="images/availablepuppies.jpg" width="200"
> height="200" />
>            <img src="images/upcomingpuppies.jpg" width="200"
> height="200" />
>        </div>
>
> what's the deal here? what do you guys see wrong with this?
>

Reply via email to