Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does the jQuery UI Icon system have an "empty" icon - one with no image?

Sounds like a bit of a silly question but it'd be a nice feature.

Does the jQuery UI Icon system have an "empty" icon - one with no image?

Am I forced to do some custom styling on a ui-icon-empty and move the background to an area of the sprite that is off the chart?

like image 970
knowncitizen Avatar asked May 24 '10 21:05

knowncitizen


3 Answers

I just ended up creating a .ui-icon-empty { background:none } and calling that via the button tool:

$(selector).button({icons:{primary: 'ui-icon-empty'}})

It worked, but seems wonky. It'd be great if there was a ui-icon-empty in ui.base

like image 147
knowncitizen Avatar answered Sep 23 '22 14:09

knowncitizen


if you look in the css file provided by jquery ui theme you will find a class named :

ui-icon-blank

you can use the same to have blank icons.

Thanks ...

TC

like image 34
Master Programmer Avatar answered Sep 21 '22 14:09

Master Programmer


If you are using an anchor in a list and want to remove the icon add "data-icon='false'" to your list tag to remove the icon.

<li data-icon="false">
    <a href="#">Label</a>
</li>
like image 1
Heidi Avatar answered Sep 19 '22 14:09

Heidi