Answer the question
In order to leave comments, you need to log in
Insert page url when Ajax loading a piece of content, but not following it?
Have this code
$(document).ready(function() {
$('#swup a').click(function(){
var toLoad = $(this).attr('href')+' #article';
$('#article').hide('fast',loadContent);
function loadContent() {
$('#article').load(toLoad,'',showNewContent())
}
function showNewContent() {
$('#article').show('normal');
}
return false;
});
});
Answer the question
In order to leave comments, you need to log in
the only problem is that the link does not change, but I would like the link to be replaced with the link of the page from which the content was pulled.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question