I think you have to publish some html to get more constructive responses
On Dec 17, 7:31 am, simshaun <simsh...@gmail.com> wrote: > Thanks for the tip. I already am canceling the link's default action > however. It is definitely the Google Analytics code on the page I'm > injecting that's causing it to break. After I remove Google > Anaylitics from the injected page, it works fine. > > At the moment, I'm performing something like this: > > $('a').click(function(e){ > e.preventDefault(); > > var inject = $(this).attr('href'); > > // $('div.container').load() goes here > > } > > On Dec 16, 6:44 pm, Kean <shenan...@gmail.com> wrote: > > > $("a").click(function(){ > > do something > > > // return false, this is jQuery's way of preventing default or > > bubbling > > return false; > > > }); > > > Hope this helps > > > On Dec 16, 11:51 am, simshaun <simsh...@gmail.com> wrote: > > > > I have a page where I am using jQuery's load function to inject HTML > > > into a div container. > > > > Right underneath the opening body tag, I've written a script that > > > binds an onClick event to all <a> tags. > > > The event fires e.preventDefault(), reads the href attribute, and > > > loads that href into a div container. > > > > At the bottom of the page, I've placed Google Analytics tracking code. > > > > Instead of loading the link's href into the div container, FireFox > > > actually tries to load the link as if I never used e.preventDefault(). > > > > IE seems to work OK though, (or handles it inappropriately and seems > > > to work fine.) > > > > The pages that are supposed to be loaded into the DIV container have > > > Google Analytics code as well. > > > Once I removed the Analytics code from those pages, everything works > > > fine. > > > > Why does having Google Analytics on pages loaded via the load function > > > cause everything to break?