Im new to jquery/javascript and need help!
I want to use the cycle plugin in multiple divs with different images in each div. Each div is the same size and each image is the same size.
The code I have used so far shows all images in the first div but when I click on my logo (which is linked to index.html) all the images suddenly appear in place and working with the cycle plugin.
This is what I have in the head
<script type="text/javascript" src="js/jquery-1.3.js"></script>
<script type="text/javascript" src="js/jquery.cycle.all.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#box1').cycle({
fx: 'fade',
speed: 300,
timeout: 0,
next: '#box1',
pause: 1
});
});
$(document).ready(function(){
$('#box2').cycle({
fx: 'fade',
speed: 300,
timeout: 0,
next: '#box2',
pause: 1
});
});
$(document).ready(function(){
$('#box3').cycle({
fx: 'fade',
speed: 300,
timeout: 0,
next: '#box3',
pause: 1
});
});
</script>
body...
<div id="container">
<div id="box1" class="box">
<img src="images/car.jpg" alt="images/car.jpg"/>
<img src="images/van.jpg" alt="images/van.jpg"/>
</div>
<div id="box2" class="box">
<img src="images/bottle.jpg" alt="images/bottle.jpg"/>
<img src="images/pattern.jpg" alt="images/pattern.jpg"/>
</div>
<div id="box3" class="box">
<img src="images/car.jpg" alt="images/car.jpg"/>
<img src="images/van.jpg" alt="images/van.jpg"/>
</div>
</div>
In the css the container is position: absolute;
I'm sure there is a simple solution but I have searched stackoverflow and other sites to no avail. Any help is greatly appreciated!!!!
$('#box').cycle()within one$(document).ready(). What is the expected behaviour? - VKen