[jQuery] [cycle] plugin and reset after clicking on it
I am using the cycle plugin to rotate through some images that are
part of a <a href> . When the link is clicked I need to reset the
images.
The reason is that I then basically hiding the div with the links
(thus cycle) but when I navigate back to them what is happening is the
link that was click the images are missing.
Hope that makes sense thanks
these control the cycle in the link
$('.subt a').children('.slide').cycle({
pause: 0,
timeout: 0
}); <!------>
$('.subt a').hover(function() {
$(this).children('.slide').cycle({
fx: 'fade',
speed: 400 ,
timeout: 1,
delay: -50
});
},
function () {$(this).children('.slide').cycle({
pause: 0,
timeout: 0
}) }
);
Then when I click the link this happens
$('.galleryFeature a').click(function(){
$(this).cycle('stop');
var url = '' + this.hash.slice(1) + '.cfm';
$('#Work .featureOuterWrapper').fadeOut('fast', function() {
$('#Work #WorkHide').fadeIn('fast').html( '<div
class="loading"><img src="images/ajaxLoadert.gif" /></div>' ).load
( url, function(){
this.scrollLeft = 0;//scroll back to the left
});
});
this.blur(); // Remove the awful outline
return false;
});
this is the HTML snippet. Basically the content in the li is faded out
and the new content faded in . the new content (WorkHide) has a link
which reverses the fade.
<li class="sub" id="Work" > <!--- feature item --->
<div id="WorkHide" style="display:none;
background-color:#fff; z-index:9"></div>
<div class="featureOuterWrapper">some
content</div>
</li>