Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6906877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:21:55+00:00 2026-05-27T08:21:55+00:00

We are using JQuery UI lib for some interface enhancements which works great. But

  • 0

We are using JQuery UI lib for some interface enhancements which works great. But since we don’t need to support IE6 and other old browsers, there is no need for classes like:

.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl

which are added by JQuery UI. Is there any way to tell JQuery UI not to add them? It is no problem to remove style from it, but it doesn’t look good when you have there a lot of empty classes.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T08:21:56+00:00Added an answer on May 27, 2026 at 8:21 am

    This is one possible way to achieve this.

    The jquery ui widgets raises a ‘create’ event that is triggered between the execution of the _create() and _init() methods:

    this._create();
    this._trigger( "create" );
    this._init();
    

    This event is raised from the base object Widget so it is available to all the widgets implementing it.

    The classes for ‘ui-corner-xxx’ (and others) are typically created in the ‘_create()’ method, so you could bind an event handler to the ‘create’ option of the widgets to remove those classes. Something like:

    var classesToRemove = ['ui-corner-all', 'ui-corner-top',
        'ui-corner-bottom', 'ui-corner-right', 'ui-corner-left',
        'ui-corner-tl', 'ui-corner-tr', 'ui-corner-bl', 'ui-corner-br'];
    
    var removeClassesCreateHandler = function(event, ui) {
        var that = this;
        $.each(classesToRemove, function(idx, val) {
            $('.' + val, that).removeClass(val);
        });
    };
    
    $("#accordion").accordion({
        create: removeClassesCreateHandler
    });
    

    Here is a working example on jsfiddle.


    About the create event of jQuery UI Widgets

    It is important to note that not all jQuery ui widgets actually implements the Widget Factory (thanks to the solution above is possible).

    So, even though the documentation page shows a create option, it is not necessarily available.

    This the case for the Datepicker for instance. It still relies on pretty old code and does not implement the Widget factory (yet – it is planned to be refactored).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the deprecated autocomplete plugin (since I'm using the legacy jquery lib
Using jQuery, how would you find elements which have a particular style (eg: float:
OK so I just started using sammy.js , I don't it very well but
I'm using the jQuery validation plugin from bassistance.de. It works fine. From <head> :
I'm using asp.net page that is fully ajaxified (with jquery lib) and calling another
I am planning on using Google to download the jQuery lib for both UI
Don't know why this is happening, but after submitting a form via JS (using
I am using jQuery. test.html contains images and text. Now I need to load
I am using jquery to add a few features onto some fields in the
If i using the official jquery lib the validator (bassistance.de/query-plugins/jquery-plugin-validation) have an annoying bug,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.