Could you define what "it opens the URL twice" mean? Does it mean it opens two windows each loading google.com? If so, it might mean you're possibly re-binding the click again to the div somewhere in your code. If would help a lot if you can post all your code or to a page that demonstrates the issue.
On Apr 22, 7:02 pm, SoulieBaby <lea...@souliedesigns.com.au> wrote: > Hi all, > > I’ve got a script which will enable an entire div to be clickable, > however when I click on the div it opens the URL twice.. Could someone > please help me out? (sorry if this is a double post, I don't think my > first one went through..?) > > The code is: > > $(".rightContent").click(function(){ > window.open($(this).find("a").attr("href")); return > false; > > }); > > And here’s the div: > > <div class="rightContent"> > <h3>Google</h3> > <div style="margin-top: 5px;"><a > href="http://www.google.com/">http://www.google.com/</a></div> > <div style="margin-top: 5px;">info goes here</div> > </div> > > Cheers > > Leanne