jquery caouresellite non funzionante

mediasteno

Utente Attivo
25 Gen 2010
120
0
0
Sto cercando di inserire in un sito una slideshow tipo jcaurosellite, prendendo come riferimento il sito http://www.gmarwaha.com/jquery/jcarousellite/ ma pur seguendo tutte le istruzioni, il mio script non funziona, come mai?

Il codice è
in head faccio i richiami al file javascript

<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jcarousellite_1.0.1.min.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.1.js"></script>

e poi ho questo codice:

HTML:
<button class="prev"><<</button>
<button class="next">>></button>
        
<div class="anyClass">
    <ul>
    <li><img src="http://static.flickr.com/66/199481236_dc98b5abb3_s.jpg" width="75" height="75" alt="" /></li>
    <li><img src="http://static.flickr.com/75/199481072_b4a0d09597_s.jpg" width="75" height="75" alt="" /></li>
    <li><img src="http://static.flickr.com/57/199481087_33ae73a8de_s.jpg" width="75" height="75" alt="" /></li>
    <li><img src="http://static.flickr.com/77/199481108_4359e6b971_s.jpg" width="75" height="75" alt="" /></li>
    <li><img src="http://static.flickr.com/58/199481143_3c148d9dd3_s.jpg" width="75" height="75" alt="" /></li>
    <li><img src="http://static.flickr.com/72/199481203_ad4cdcf109_s.jpg" width="75" height="75" alt="" /></li>
    <li><img src="http://static.flickr.com/58/199481218_264ce20da0_s.jpg" width="75" height="75" alt="" /></li>
    <li><img src="http://static.flickr.com/69/199481255_fdfe885f87_s.jpg" width="75" height="75" alt="" /></li>
    <li><img src="http://static.flickr.com/60/199480111_87d4cb3e38_s.jpg" width="75" height="75" alt="" /></li>
    <li><img src="http://static.flickr.com/70/229228324_08223b70fa_s.jpg" width="75" height="75" alt="" /></li>
    </ul>
</div>

<script type="text/javascript">
 $(function() {
    $(".bounceout .jCarouselLite").jCarouselLite({
        btnNext: ".bounceout .next",
        btnPrev: ".bounceout .prev",
        easing: "bounceout",
        speed: 1000
    });
 });
</script>

Non riesco a capire l'errore
 
Ciao,
l'errore è nel nome della class che dai al div che non indichi poi nella chiamata jquery
cosi funziona
HTML:
<!DOCTYPE html>
<html>
    <head>
        <title>jCarouselLite</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
        <script src="jCarouselLite.js" type="text/javascript"></script>
    </head>
    <body>
        <button class="prev"><<</button>
        <button class="next">>></button>

        <div class="anyClass">
            <ul>
                <li><img src="http://static.flickr.com/66/199481236_dc98b5abb3_s.jpg" width="75" height="75" alt="" /></li>
                <li><img src="http://static.flickr.com/75/199481072_b4a0d09597_s.jpg" width="75" height="75" alt="" /></li>
                <li><img src="http://static.flickr.com/57/199481087_33ae73a8de_s.jpg" width="75" height="75" alt="" /></li>
                <li><img src="http://static.flickr.com/77/199481108_4359e6b971_s.jpg" width="75" height="75" alt="" /></li>
                <li><img src="http://static.flickr.com/58/199481143_3c148d9dd3_s.jpg" width="75" height="75" alt="" /></li>
                <li><img src="http://static.flickr.com/72/199481203_ad4cdcf109_s.jpg" width="75" height="75" alt="" /></li>
                <li><img src="http://static.flickr.com/58/199481218_264ce20da0_s.jpg" width="75" height="75" alt="" /></li>
                <li><img src="http://static.flickr.com/69/199481255_fdfe885f87_s.jpg" width="75" height="75" alt="" /></li>
                <li><img src="http://static.flickr.com/60/199480111_87d4cb3e38_s.jpg" width="75" height="75" alt="" /></li>
                <li><img src="http://static.flickr.com/70/229228324_08223b70fa_s.jpg" width="75" height="75" alt="" /></li>
            </ul>
        </div>

        <script type="text/javascript">
            $(function() {
                $(".anyClass").jCarouselLite({
                    btnNext: ".next",
                    btnPrev: ".prev",
                    speed: 1000
                });
            });
        </script>
    </body>
</html>
 

Discussioni simili