jQuery UI supplies a set of 174 themed icons that can be displayed on buttons. You
can show a single icon on the left (the primary icon), or one on the left and one on
the right (as a secondary icon).
Icons are specified as a class name that identifies the icon. For example, to create a
button with an icon that represents a little wrench, we’d use this code:
$('#wrenchButton').button({
icons: { primary: 'ui-icon-wrench' }
});
If we wanted a star on the left, and a heart on the right, we’d do this:
$('#weirdButton').button({
icons: { primary: 'ui-icon-star', secondary: 'ui-icon-heart' }
});
Comments
Post a Comment