Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

image slider and a cycle plugin of jquery not working together

Tags:

jquery

plugins

Here i am using a image slider and a cycle plugin of jquery. but only one of them working whose code is placed above . Where is the problem ? mY CODE OF HEAD CONTENT IS GIVEN BELOW.

<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/easySlider1.7.js" type="text/javascript"></script>

  <link href="css/jq.css" rel="stylesheet" type="text/css" />
<link href="css/cycle.css" rel="stylesheet" type="text/css" />
<script src="Scripts/jquery-1.7.1.js" type="text/javascript"></script>
<script src="js/chili-1.7.pack.js" type="text/javascript"></script>
<script src="js/jquery.easing.1.3.js" type="text/javascript"></script>
<script src="js/jquery.cycle.all.js" type="text/javascript"></script>

 $(document).ready(function () {

     $('#s1').cycle({
         fx: 'scrollDown',
         speedIn: 2000,
         speedOut: 500,
         easeIn: 'easeInCirc',
         easeOut: 'easeOutBounce',
         delay: -2000
     });

         $("#slider").easySlider({
             auto: true,
             continuous: true,
             nextId: "slider1next",
             prevId: "slider1prev"
         });



 });

<link href="css/screen.css" rel="stylesheet" type="text/css" />

slider code

    <div id="slider" >
        <ul>                
            <li><a href="http://templatica.com/preview/30"><img src="images/01.jpg" alt="Css Template Preview" /></a></li>
            <li><a href="http://templatica.com/preview/7"><img src="images/02.jpg" alt="Css Template Preview" /></a></li>
            <li><a href="http://templatica.com/preview/25"><img src="images/03.jpg" alt="Css Template Preview" /></a></li>
            <li><a href="http://templatica.com/preview/26"><img src="images/04.jpg" alt="Css Template Preview" /></a></li>
            <li><a href="http://templatica.com/preview/27"><img src="images/05.jpg" alt="Css Template Preview" /></a></li>          
        </ul>

    </div>
     <div class="clear">
     </div>
 </div>

and cycle plugin html

        <img src="http://cloud.github.com/downloads/malsup/cycle/beach1.jpg" alt="" />

        <img src="http://cloud.github.com/downloads/malsup/cycle/beach2.jpg" alt=""  />

        <img src="http://cloud.github.com/downloads/malsup/cycle/beach3.jpg" alt="" />

    </div>
like image 306
Ankush Jain Avatar asked Nov 22 '25 14:11

Ankush Jain


1 Answers

The include order may matter and you have a duplicate jquery.js. Try this order:

<link href="css/jq.css" rel="stylesheet" type="text/css" />
<link href="css/cycle.css" rel="stylesheet" type="text/css" />

<script src="Scripts/jquery-1.7.1.js" type="text/javascript"></script>
<script src="js/jquery.easing.1.3.js" type="text/javascript"></script>
<script src="js/jquery.cycle.all.js" type="text/javascript"></script><script src="js/easySlider1.7.js" type="text/javascript"></script>
<script src="js/chili-1.7.pack.js" type="text/javascript"></script>
like image 139
Tina CG Hoehr Avatar answered Nov 25 '25 06:11

Tina CG Hoehr



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!