Using jQuery loop plugin to loop through divs

I am trying to loop through several divs that are generated dynamically through wordpress.

Divas do not move on a bicycle or slip, no matter what I try, and I cannot understand why.

Currently, the source code is as follows:

<div class="slider">

    <div class="servicesslider">    
           <a href="link1">
            <div class="slidertext">
               <h1 class="sliderhead">Text1</h1>
                <p>Body copy</p>
            </div>  
    <img width="450" height="270" src="imglink" class="attachment-front-page-services wp-post-image" alt="alt" title="title" />                     
            </a>

    </div>



   <div class="servicesslider"> 
      <a href="link2">
         <div class="slidertext">
        <h1 class="sliderhead">Text2</h1>
        <p>More body copy.</p>
         </div>
      <img width="450" height="270" src="imglink" class="attachment-front-page-services wp-post-image" alt="alt" title="title" />
       </a>

    </div>

CSS

.slider {width:1000px; height:400px; overflow:hidden; position:relative;}

.servicesslider {width:900px; height:300px; padding:50px; overflow:hidden; float:left; position:absolute; background:red;}
.servicesslider a {text-decoration:none;}
.attachment-front-page-services {width:450px; height:270px; background:#fff; border:10px solid #fff; border-radius:5px; -moz-border-radius:5px; -webkit-border-radius:5px; box-shadow: 5px 5px 7px #4f4f4f;}
.slidertext {font-family: Eurostyle; color:#ffffff; text-decoration:none; float:left; margin-right:20px; width:400px;}
.sliderhead {font-size:50px;}
.sliderhead a {color:#ffffff; text-decoration:none;}

jQuery (using the simplest version just to make something happen)

<script type="text/javascript">
    $(document).ready(function () {
        $('.slideshow').cycle({
            fx: 'fade'
        });
    });
</script>

jQuery is definitely loaded, and I use this link to ensure the loop plugin loads correctly

<script type="text/javascript" src="http://malsup.github.com/jquery.cycle.all.js"></script>

!!!!!!!!!! * SOLVED * !!!!!!!!!!

There was a jQuery conflict in wordpress. It had two versions of jQuery working simultaneously

+3
source share
2 answers

,

$('.slideshow')

$('.slider')

: http://jsfiddle.net/cchana/kenWK/

+4

JQuery.

<script type="text/javascript">
    $(document).ready(function () {
        $('.slider').cycle({
            fx: 'fade'
        });
    });
</script>

.

div, . .

0

All Articles