jquery ui button custom icons

Posted by Brett on Stack Overflow See other posts from Stack Overflow or by Brett
Published on 2010-10-01T02:52:34Z Indexed on 2010/12/28 18:54 UTC
Read the original article Hit count: 363

Filed under:
|
|

It is easy to add one of the icons available as part of the UI Icon Set:

$("#myButton").button({icons: {primary: "ui-icon-locked"}});

But what if I want to add one of my own icons that is not part of the framework icon set? I thought it would be as easy as giving it your own CSS class with a background image, but that doesn't work. Any suggestions?

.fw-button-edit
{
    background-image: url(edit.png);
}

© Stack Overflow or respective owner

Related posts about jquery-ui

Related posts about button