I have two forms that are fairly identical located on different pages of a site. In order to call distinct jQuery ajax functions there are two class names I need to alter. For one of the pages, I place this script


and it is not working. I have tried with that script loaded in the header or the footer. Most examples of switchClass I found on the net have examples where the trigger event is clicking on a div. Is what I am trying to do possible?

3 Years
Discussion Span
Last Post by dwlamb

Hmm... did you remember to include the reference to the jQuery UI file(s)? The switchClass() is not part of jQuery core, its part of JQueryUI. Your code example seems to work fine..

jsfiddle demo >> http://jsfiddle.net/6XeyU/

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.