I have a page with jQuery content loaded, one of the div will be a slider
$('#slides').slides({
preload: true,
preloadImage: 'img/loading.gif',
play: 6000,
pause: 2500,
hoverPause: true,
slideSpeed: 1000,
animationStart: function(current){
$('.caption').animate({
bottom:-35
},100);
},
animationComplete: function(current){
$('.caption').animate({
bottom:0
},200);
},
slidesLoaded: function() {
$('.caption').animate({
bottom:0
},200);
}
});
});
now, the html is structured like this:
<div id"content">
<div id="slider"></div>
</div>
I've got my page setup using jquery, when a user clicks on a link, it will load that page's content to the #content
var homepage = $("#content").html();
$("#content").load("myContent.html");
If the user goes back to home, simply :
$("#content").html(homepage);
but then the $('#slides').slides(); doesn't work anymore.
how do I fix this?