[jQuery] Re: HOW: jQuery AJAX to replace iFRAME

2008-12-29 Thread Alexandre Plennevaux
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

[jQuery] Re: HOW: jQuery AJAX to replace iFRAME

2008-12-29 Thread BlueStunt
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

[jQuery] Re: HOW: jQuery AJAX to replace iFRAME

2008-12-22 Thread Alexandre Plennevaux
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); }); });