Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Javascript CSS HTML jQuery , +
i want to do a basic jquery to a photo gallery, i want to have some images and two buttons to show next images and previous images. Im trying to do it with jcarousellite but nothing happens but i guess everything is ok!
 
This is my jquery script:
 
<script type="text/javascript" src="jcarousellite_1.0.1.min.js"></script>
 

   <script type="text/javascript">
        $(document).ready(function() {
            $("#images").jCarouselLite({
              btnNext: "#prevBTN",
              btnPrev: "#nextBTN",
              visible: 1
            })
        });
 
    </script>
 
This is my html code:
 
 <div id="mainCenterContainer">
 
  <h1>Design<span>Gallery</span></h1>
 
  <div class="fr" id="nextBTN"><img src="images/nexticon.png" width="40" height="40" alt="Next" title="Next">  </div>
  <div class="fr" id="prevBTN"><img src="images/previousbutton.png" width="40" height="40" alt="Back" title="Back"></div>
 
<div class="cr"></div>
     <div id="images">
        <ul>
            <li>
                <img src="images/pic4.jpg" alt="Image" title="Image 1"</a>
                <img src="images/pic4.jpg" alt="Image" title="Image 2"</a>
                <img src="images/pic4.jpg" alt="Projecto Image" title="Image 3"</a>
                <img class="removeMargin" src="images/pic4.jpg" alt="Image" title="Projecto 4"</a>
                <img src="images/pic4.jpg" alt="Projecto Image" title="Image 5"</a>
                <img src="images/pic4.jpg" alt="Projecto Image" title="Image 6"</a>
                <img src="images/pic4.jpg" alt="Projecto Image" title="Image"</a>
                <img class="removeMargin" src="imagens/pic4.jpg" alt="Image" title="Projecto 8"</a>
            </li>
 
            <li>
                <img src="images/pic4.jpg" alt="Image" title="Image 1"</a>
                <img src="images/pic4.jpg" alt="Image" title="Image 2"</a>
                <img src="images/pic4.jpg" alt="Image" title="Image 3 "</a>
                <img class="removeMargin" src="imagens/pic4.jpg" alt="Image" title="Image"</a>
                <img src="images/pic4.jpg" alt="Image" title="Image"</a>
                <img src="images/pic4.jpg" alt="Image" title="Image "</a>
                <img src="images/pic4.jpg" alt="Image" title="Image "</a>
                <img class="removeMargin" src="images/pic4.jpg" alt="Image" title="Image"</a>
            </li>
         </ul>
 

 </div>
Posted 14-Dec-13 6:37am
mibetty480

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I found the problem, its because when we need to use many jquery functions i guess we need to do the import
<script type="text/javascript" src="jcarousellite_1.0.1.min.js"></script> before our function that needs this import!
Thanks!
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web04 | 2.8.140709.1 | Last Updated 14 Dec 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid