开发者

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

开发者 https://www.devze.com 2023-03-24 12:39 出处:网络
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

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

精彩评论

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

关注公众号