noway noway - 1 year ago 101
jQuery Question

Text inputs with 'X' icon to clear the field once you start typing

Search inputs are styled with pill-shaped corners and adds an "x" icon to clear the field once you start typing.

Can I do the same for regular text boxes? See the fiddle please:

Answer Source

Just add data-type="search" to the text input, and it will receive the same style as the search box, but that will also include the magnifying glass, here are some option:


A little fiddling around, came up with this:


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download