javascript - Jquery icon button -


hey i'm trying make icon button collapses , expands text. have working logic collapse/expand part i'm finding trouble creating icon button. have use downloaded theme have is:

<span id="toggleerrorbtn" class="ui-icon ui-icon-plus" style="background-image: url(images/ui-icons_cd0a0a_256x240.png); height: 15px; border:white; background-repeat: no-repeat; display: inline;">     <button></button> </span> 

when run code see icon next empty button when try use "display:none;" on button, disappears. there way remove button , leave icon?

edit: image different color. tried changing button visibility: hidden; left me 2 icons, replacing button &nbsp; worked nice. problem when mouse hovers on icon identifies text instead of button. ideally i'd

<button id="toggleerrorbtn" class="ui-icon ui-icon-plus" style="background-image: url(images/ui-icons_cd0a0a_256x240.png); height: 15px; border:white; background-repeat: no-repeat; display: inline; background-position-x: -20px;">     </button> 

but can't change background color. there workarounds?

try visibility: hidden; instead of display: none;

this leave button in dom not show user.

to add back, use visibility: visible;

hope helpful!


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -