diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-07-12 17:59:43 +0200 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-07-12 18:07:40 +0200 |
commit | e054e28836e616ed03561d5a8195bbea525866d1 (patch) | |
tree | c3e74591c21e526d3727832cb202ffb45565825b /ui/jquery.ui.spinner.js | |
parent | 7759fb4dba5d4135297994a8292dad093d704e19 (diff) | |
download | jquery-ui-e054e28836e616ed03561d5a8195bbea525866d1.tar.gz jquery-ui-e054e28836e616ed03561d5a8195bbea525866d1.zip |
Spinner: Introduce icons option to make button icons customizable, mostly for consistency
Diffstat (limited to 'ui/jquery.ui.spinner.js')
-rw-r--r-- | ui/jquery.ui.spinner.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/jquery.ui.spinner.js b/ui/jquery.ui.spinner.js index 6acb3693e..ead3b17be 100644 --- a/ui/jquery.ui.spinner.js +++ b/ui/jquery.ui.spinner.js @@ -32,6 +32,10 @@ $.widget( "ui.spinner", { widgetEventPrefix: "spin", options: { culture: null, + icons: { + down: "ui-icon-triangle-1-s", + up: "ui-icon-triangle-1-n" + }, incremental: true, max: null, min: null, @@ -244,10 +248,10 @@ $.widget( "ui.spinner", { _buttonHtml: function() { return "" + "<a class='ui-spinner-button ui-spinner-up ui-corner-tr'>" + - "<span class='ui-icon ui-icon-triangle-1-n'>▲</span>" + + "<span class='ui-icon " + this.options.icons.up + "'>▲</span>" + "</a>" + "<a class='ui-spinner-button ui-spinner-down ui-corner-br'>" + - "<span class='ui-icon ui-icon-triangle-1-s'>▼</span>" + + "<span class='ui-icon " + this.options.icons.down + "'>▼</span>" + "</a>"; }, |