1
I’m using the Nivo Slider plugin to create a slider on my page. If I put the slider structure directly on the page, it loads right... but if it is inside a content loaded via ajax, just nothing appears.
What can it be? The funny thing is that lighbox works, but the slider doesn’t...
I use it to load the slider:
<script type="text/javascript">
$(window).load(function() {
$('#slider').nivoSlider();
});
</script>
And that’s what I call my ajax content:
<script type="text/javascript">
function startEmpreendimento(e) {
e.preventDefault();
var href = "<?php echo $primeiroID; ?>";
$("#content-empreendimentos").load(href + " #content-empreendimentos");
}
window.onload=startEmpreendimento;
I don’t know if it’ll solve your problem, but I’ve been through something like this. I was told that loading Ajax does not load the Jquery scripts, so a possible solution is you put the scripts in the initial page loading (At least with me it works)
– ivan veloso
it is, the big problem is just this: I load EVERYTHING on the home page, inside the ajax is only the div with the content of the slider... if I put the same div of the slider OUT of the load via ajax, ie, directly in the index, everything goes well.
– Murilo Ravani
You use the WAMP SERVER?
– ivan veloso
No, locally I develop with shaman.
– Murilo Ravani
Here is a project of mine that I use lightbox and ajax loading, maybe it helps you. The INDEX page ta with ajax loading and lightbox and the WMIN page is loaded, look at the ajax loading scripts, it might help you.. http://www.4shared.com/rar/lwgAYTvqba/projeto01.html
– ivan veloso