views:

75

answers:

2

Hi, i am using tis code for tab navigation.

function hashIt(toHash) {
    toHash == "" 
     ? window.location.hash = window.location.hash.replace( /#.*/, "") 
     : window.location.hash = toHash;
    return false;
}

and also i am using jquery popup on page onload. a hyperlink in the popup is not working, if i remove the hashIt function its fine. but i want both. Please help me out.

Ramesh.

A: 

try to remove return false;, then check if it still works... (suspecting something)

Reigel
+1  A: 

Your function should just be

function hashIt(toHash) {
    window.location.hash = toHash;
}

without all the extra logic. Then to clear the hash, just call hashIt("");

Jeff Schumacher