Jquery href with hash
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 h开发者_开发百科ashIt function its fine. but i want both. Please help me out.
Ramesh.
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("");
try to remove return false;
, then check if it still works... (suspecting something)
精彩评论