views:

26

answers:

1

My problem is that predefined jQuery UI classes like .ui-state-error and .ui-state-highlight doesn't change visual style if applied after (document).ready.

I have tab control that loads it's tab content after user has selected a tab. What happens is that after this selected tab has loaded it's content (containing items with .ui-state-error classes) visual style doesn't change. Tab change doesn't give any document ready events.

Any ideas how can I force jQuery to check styling of the items that have been added after (document).ready?

A: 

You can use the live() in JQuery to apply styling to elements that are added after the document has been loaded.

Description: Attach a handler to the event for all elements which match the current selector, now or in the future.

TooFat
Thanks for the reply. I would use it if I had my own CSS (and I have been using), but I want to use jQuery UI's pre-defined classes and I don't want to manually add same CSS as in the jquery-ui.css file. Plus I don't know what other purposes are for those classes..In a nutshell.. I just want jQuery UI Framework classes to do what they're supposed to do without doing same things by myself
Tx3