views:

2612

answers:

4
+1  Q: 

Jquery and Safari

+1  A: 

How accurate is your HTML pasting?

You never closed your "moreFacetsLink" anchor tag, which probably makes Safari think that it was implicitly closed, and the "bunch of text" is surrounded by an additional, HREF-less Class-less Unclosed anchor tag... evidenced by the fact that this:

$(".moreFacetsLink").click(function () {
    $(this).siblings("a").children("div").toggle();
});

... does what you want with your submitted markup.

Close off your anchor tag properly (bonus points for including the href attribute) and you should be good to go.

Pseudo Masochist
Sorry - hand typed the above html, i've correct the syntax errors. The html in my code is correct.
A: 

I corrected the html in my question, sorry for the bad cut and paste job. The solution above did not work. It is possible that .siblings doesn't function properly in Safari?

What version of Safari? A version I made identical to yours works fine in Windows Safari 3.0.2. What does alert($(this).siblings("div").size()); show you?
Pseudo Masochist
A: 

href="" is reloading your page in safari
I would try using css to underline and style it, and drop the empty href.

cobbal
A: 

I'm pretty sure you need to return false; from the click function to cancel the link click.

Scott Rippey