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

  • SEARCH
  • Home
  • 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 8245061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:03:55+00:00 2026-06-07T22:03:55+00:00

Is there an easy way to use an external icon for JQuery UI? Say

  • 0

Is there an easy way to use an external icon for JQuery UI?

Say I have the following icon on a button:

  <script type="text/javascript">
    $(document).ready(function () {
        $('#aButton').button({
            icons: 
            {
                primary: "ui-icon-newicon"
            }
        });
    });
</script>

<button id="aButton">hello</button>

Is it possible to display an external jpeg or png? What is the easiest was to do this without editing the existing JQuery UI png files?

I have previously managed to achieve this by manually editing and replacing an icon that I don’t use in the ui-icons_xxxxxx_256x240.png files which works great until I upgrade to a new version of JQuery UI using nuget and the png files are replaced.

Edit:

Created this class in my Site.css (its a ASP.NET MVC3 app) and needed to add the !important flag. Didn’t have any issues with state (when the button is highlighted, hover etc).

.ui-icon-newicon
{
    background-image: url(images/delete.png) !important;
    background-position: 0 0;
}  
  • 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-06-07T22:03:56+00:00Added an answer on June 7, 2026 at 10:03 pm

    Sure, just add your own file and supply a CSS class for that specific button, something like:

    #aButton.ui-icon-custom {
        background-image: url(...);
        background-position: 0 0;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there an easy way to use UIElement.Effect in WPF to shift the color
Is there an easy way to use DirectX in Java? In particular, DirectX's video
Is there an easy way to use Bootstrap in an existing project? Currently it
Is there an easy way in javascript to only escape certain ranges of control
Is there an easy way to use Emacs key-bindings when you are using a
Is there any easy way / library / external app to introduce Unit of
Is there an easy way to use Spring IoC for a factory which returns
Is there an easy way to use python string formatting from within a django
The SWT-Gui looks very nice. Is there an easy way to use it in
Is there an easy way to use the Python library html5lib to convert something

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.