Thanks guys. I was hoping it was something obvious. Will experiment and let you know if I get it solved.
K -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of cricket Sent: Monday, March 21, 2011 3:22 PM To: [email protected] Subject: Re: Ajax Question On Mon, Mar 21, 2011 at 6:38 AM, Krissy Masters <[email protected]> wrote: > I have stripped everything out to barebones pretty much to see if it was > something in the code but this below still makes the page jump (FF / IE / > Chrome that I tested in) > > $("a.is_ajax").live('click',function(e) { > var page_url = $(this).attr("href"); > e.preventDefault(); > $.ajax({ > type: "get", > url: page_url, > success: function(response){ > $('#pageCore').html(response); > } > > }); > return false; > }); I was going to chime in to mention preventDefault() or returning false but you have that covered. The only other thing I can think of is that inserting the content into the div is for some reason causing the window to jump. Try varying the response--perhaps something about the HTML you're returning is triggering this. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
