michaelmcgurk
michaelmcgurk

Reputation: 6509

Hyperlink not working in jQuery Tabs

I have the following code: http://pastebin.com/gg4kgGKz

On line 240 of the pastebin code, I have tried to add a hyperlink in one of the list items. However, this does not open the URL, but only closes the tab.

Why is this?

Is there something obvious I've done wrong?

Many thanks for any help.

Upvotes: 0

Views: 265

Answers (3)

Voooza
Voooza

Reputation: 779

In my opinion the line 94:

e.preventDefault();

prevents link opening

Upvotes: 0

simoncereska
simoncereska

Reputation: 3043

before binding tabs try to write something like

$('a.selector').click(function () { location.href = $(this).attr('href') })

Upvotes: 1

Alex
Alex

Reputation: 9031

Line 94 e.preventDefault(); means that the href doesnt trigger, hence not loading google.

Remove this and it works fine, see here

Upvotes: 1

Related Questions