views:

364

answers:

2

Hi

I am currently developing a webpage where I want to use the ToggleClass function from jQuery. I went on to the jQuery UI website, as I think this is an extension of the original jQuery.

http://jqueryui.com/demos/toggleClass/

When I click the 'Run Effect' button, nothing happens. Is it just my browser or slow computer or do any of you also get this in Safari 4.0.1 4.0 (4530.17)?

I tested in Firefox 3.0.10 and it worked, so by the looks of it, jQuery UI is not all that compatible with Safari 4.0.1 4.0 (4530.17), or just maybe their demos on their site?

Anyone care to elaborate?

Edit: sorry, was under the impression that I had 4.0.1

A: 

Windows: Safari 4.0 (530.17): Fail

That being the case, .animate() still appears to work. If your transformation isn't too complicated, you could use that as your alternative.

Jonathan Sampson
A: 

I had the same problem, but I knew it was my code b/c the example page at the reference you provided above worked just fine.

Check your .css. For some reason, the css

'a.filterOn:link, a.filterOn:visited{ background: green; }'

wouldn't work in Safari, but worked just fine in FF. However, b/c these were nested inside of another element, I tried:

'#filters a.filterOn:link, #filters a.filterOn:visited{ background: green; }'

which for some reason worked. My guess is that, if you haven't solved it yet, the problem is in the .css, not the jquery.

staypuffinpc