got a problem, can’t get my head around this jquery and would appreciate your help/guidance.
Function I need:
Each menu list contains images that should scroll through when clicked & scroll though when mouse over. If mouse hover it will scroll through the images in set interval time limit.
Once I make it scroll then i’ll seek for further functionality but would appreciate if it could at least work at this moment
Ultimate function: to also stop animation when mouseout maybe include more efficient coding using .wrap and perhaps pausing the image when mouseover image div.
Here is the Jquery I wrote which doesn’t work btw.
$(function() {
$('.main-img ul').cycle({
fx: 'fadeout',
height: 458,
speed: 300,
timeout: 0,
pager:'.menu ul li',
pagerEvent: 'click',
pagerAnchorBuilder: function(idx, slide) {
return '.menu ul li:eq(' + idx + ') a';
},
after: function(){
// start new sub animaion
},
before: function(){
// stop the current animation
}
});
});/*
and here is the html
<div class="main-cont">
<div class="menu">
<div class="portfolio"><span>Portfolio</span></div>
<ul>
<li><a href="#" class="camp-txt"><span>One</span></a></li>
<li><a href="#" class="edit-txt"><span>Two</span></a></li>
<li><a href="#" class="ad-txt"><span>Three</span></a></li>
<li><a href="#" class="bio-txt"><span>Four</span></a></li>
<li><a href="#" class="vid-txt"><span>Five</span></a></li>
</ul>
<div class="footer"><span>Footer</span></div>
</div>
<div class="main-img">
<ul>
<li><ul>
<li><img src="images/port/1.jpg" width="597" height="453" alt="img" /></li>
<li><img src="images/port/2.jpg" width="597" height="453" alt="img" /></li>
<li><img src="images/port/3.jpg" width="597" height="453" alt="img" /></li>
</ul></li>
<li><ul>
<li><img src="images/port/4.jpg" width="597" height="453" alt="img" /></li>
<li><img src="images/port/5.jpg" width="597" height="453" alt="img" /></li>
<li><img src="images/port/6.jpg" width="597" height="453" alt="img" /></li>
</ul></li>
<li><ul>
<li><img src="images/port/7.jpg" width="597" height="453" alt="img" /></li>
<li><img src="images/port/8.jpg" width="597" height="453" alt="img" /></li>
</ul></li>
<li><ul>
<li><img src="images/port/9.jpg" width="597" height="453" alt="img" /></li>
<li><img src="images/port/10.jpg" width="597" height="453" alt="img" /></li>
</ul></li>
<li><ul>
<li><img src="images/port/11.jpg" width="597" height="453" alt="img" /></li>
<li><img src="images/port/12.jpg" width="597" height="453" alt="img" /></li>
</ul></li>
</ul>
</div>
If you are wanting all of the sub UL’s displayed, and menu hover to trigger pause/resume of applicable slideshow try this:
DEMO : http://jsfiddle.net/Gq8uu/2/