I've got a div (#slide2) where I would like to load a portion of an other .php file (content in div.side). Here's what I got so far :
function uniqueId() { return new Date().getTime() };
$(function() {
$("#slide2").load("content01.php?uid= .slide"+uniqueId(), function() {
applyRestOfJqueryAfterAjaxLoads();
)};
});
function applyRestOfJqueryAfterAjaxLoads() {
$('#slides').superslides({
slide_easing: 'easeInOutCubic',
slide_speed: 800,
pagination: true,
hashchange: true,
scrollabe: true
});
});
Thanks for the help!
Try this code
$(function() {
$("#slide2").load("content01.php #slide"+uniqueId(), function() {
applyRestOfJqueryAfterAjaxLoads();
)};
});
Note that "#slide"+uniqueId()
will return the id of the content you want to load
So I had to append the selected content (#slide2) after uniqueId
UniqueId is used so that IE and other gets the newest content, and not the one that is cached.
function uniqueId() { return new Date().getTime() }; // So that IE gets the newest content
$(function() { $("#slide2").load("content01.php?"+uniqueId()+" #slide", function(){
applyRestOfJqueryAfterAjaxLoads();
});
function applyRestOfJqueryAfterAjaxLoads() {
// All the code I need to re-initialise
}
});
Though it did worked fine, does is seems to be a mistake?