add to the script:
return false;
to prevent the default behaviour
$(document).ready(function(){
$('a.ajaxLink').click(function(){
var url = $(this).attr('href');
$('#ihateiframes').empty().load(url);
});
return false;
});
On Mon, Dec 29, 2008 at 3:32 PM, BlueStunt wrote:
>
> I'm trying to
I'm trying to do the same thing, the code you suggested works, but the
text on the page changes to what's in the html file I link to but then
the browser also moves to the page, how do i stop this?
On Dec 22, 1:51 pm, "Alexandre Plennevaux"
wrote:
> say the container that will display the loaded
say the container that will display the loaded content, i.e, your iframe
becomes
click me
click me 2
this will be replaced
your javascript will be:
$(document).ready(function(){
$('a.ajaxLink').click(function(){
var url = $(this).attr('href');
$('#ihateiframes').empty().load(url);
});
});
3 matches
Mail list logo