0

After recently completing a single page AJAX application with jQuery and jQuery UI, I discovered a few jQuery form styles I had previously skipped over in their documentation.

Adding the classes:

 text ui-widget-content ui-corner-all

Is there an easy way I can implement these styles to all text inputs throughout the entirety of my AJAX driven application? I would like to find a resolution without having to resort to any of the following:

  1. Paste the previous mentioned classes into every input form (I have quite a few and it looks terribly messy... unless this is best practice, it doesn't feel quite right though)
  2. Having to add "$("input").addClass()" to every AJAX callbacks (seems messy too).

I would rather not use any more jQuery plugins but would be willing to consider one depending on how simple it would make this task...

1 Answer 1

1

Why dont you do this at your ui's css stylesheet

 text ui-widget-content ui-corner-all, input{....}

will give the same effects to all your inputs.

Sign up to request clarification or add additional context in comments.

1 Comment

Well, I am trying to utilize the CSS that the jQuery UI themes provide. I think as a last resort I could probably copy the CSS from the theme I am using into an input CSS selector. I have a few themes my application can switch through making that slightly more complicated though...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.