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 4074354
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T17:09:26+00:00 2026-05-20T17:09:26+00:00

Been trying to add a icon to a button but cant seem to get

  • 0

Been trying to add a icon to a button but cant seem to get it working.

JS

$(document).ready(function(){ 

   $("button, input:submit, input:reset, input:button", "#customer_wrapper").button();

   $("#save_customer").button({
       icons: {primary: 'ui-icon-disk'}
   });

});

HTML

<button name="save_customer" id="save_customer" value="Save" />Save</button>

The first button shows no icon and the second the icon and text are not inline. What would be the best way to add a icon?

Thanks

UPDATED

Ok part of it is my fault for not closing the button tag. It loads the icon with the text on the next line.

HTML from browser

<button id="save_customer" name="save_customer" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary" role="button" aria-disabled="false">
   <span class="ui-button-icon-primary ui-icon ui-icon-disk"> </span>
   <span class="ui-button-text">Save</span>
</button>

CSS

.ui-icon-disk {
  background-position: -96px -112px;
}
.ui-button .ui-button-text {
  display: block;
  line-height: 1.4;
}
  • 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-20T17:09:27+00:00Added an answer on May 20, 2026 at 5:09 pm

    Your HTML code for button with icon should like this:

    <button name="save_customer" id="save_customer">Save</button>
    

    http://jsfiddle.net/ynhat/fWkbv/

    Please make sure you dont have 2 elements with same ID.

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

Sidebar

Related Questions

At www.euroworker.no/order I have been trying to add a tooltip function but it seems
I have been trying to add a button to the SherlockActionBar but I can't
I've been trying to add Facebook Connect to a website, but it didn't seem
I have been trying to add a button after a parser ( on a
I have been trying to add an icon to a doorhanger notification in my
I've been trying to add cc and bcc addresses to log4net's SmtpAppender but I'm
So I've been trying to add a model function in Django that takes arguments
I've been trying to add JavaScript to my HTML/CSS, but been running around in
I have been trying to add a mod_rewrite to a site but its only
So Ive been trying to add a button underneath a listview in android, the

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.