开发者

jquery plugin to display a 'clear' button in a search input box

I am having trouble trying to find something I know that does exist. In some forms your can clear your textbox by clicking on a 'cross'. It looks like this

jquery plugin to display a 'clear' button in a search input box

I am looking for a JQuery plugin that can add that to a textbox for me. Any 开发者_StackOverflow中文版help is appreciated.


Hows this for an option:

http://jsfiddle.net/ajthomascouk/hQLzX/

So basically i've enclosed the input and img inside a span, which will act as the parent.

UPDATE

I've improved my answer - http://jsfiddle.net/ajthomascouk/apgws/

Still does the same thing except now you dont have to hard code it, jQuery will do it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜