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-
input
.ui-icon-
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