[EMAIL PROTECTED] wrote:
Hi

can jquery help with the followng problem?

If, in conventional javascript, I have a function
goToAnchor(){
 href.location="#blah"
}
and call it by <body onLoad="goToAnchor()">

then it works fine in i.e. and firefox but causes safari to endlessly
load the page - see (http://www.s-seven.net/safari_bug.html#h_value6)

I'd been hoping that jquery had a function which could handle this,
but haven't found it - sorry if its obvious (I hope it is :))

Many thanks

Ron

Hi Ron, the infamous eternal load state bug... I needed to fix that for the Tabs plugin. You have to submit a form to the anchor in Safari:

Like this:

var hash = 'foo';

if ($.browser.safari) {

// Simply setting location.hash puts Safari into the eternal load state... ugh! Submit a form instead. var tempForm = $('<form action="#' + hash + '"><div><input type="submit" value="h" /></div></form>').get(0); // no need to append it to the body
                tempForm.submit();

} else {

    location.hash = hash;

}


-- Klaus

Reply via email to