Using jQuery UI icons

前端 未结 3 546
庸人自扰
庸人自扰 2021-02-05 00:59

jQuery UI comes with handy icons in a sprite image; see the themeroller.

I have an input element for which I want the clock icon (with class .ui-icon-

3条回答
  •  孤独总比滥情好
    2021-02-05 01:24

    You can do that with JQuery UI script.

    JS:

    $(function() {
       $("input").button({
         icons: {
           primary: ".ui-icon-clock"
         },
         text: false
       })
    });
    

    HTML:

    some text
    

    See http://jqueryui.com/button/#icons

提交回复
热议问题