// culture is tested after numberFormat, since it depends on numberFormat
+test( "icons: default ", function() {
+ expect( 2 );
+ var element = $( "#spin" ).val( 0 ).spinner().spinner( "widget" );
+ equal( element.find( ".ui-icon:first" ).attr( "class" ), "ui-icon ui-icon-triangle-1-n" );
+ equal( element.find( ".ui-icon:last" ).attr( "class" ), "ui-icon ui-icon-triangle-1-s" );
+});
+
+test( "icons: custom ", function() {
+ expect( 2 );
+ var element = $( "#spin" ).val( 0 ).spinner({
+ icons: {
+ down: "custom-down",
+ up: "custom-up"
+ }
+ }).spinner( "widget" );
+ equal( element.find( ".ui-icon:first" ).attr( "class" ), "ui-icon custom-up" );
+ equal( element.find( ".ui-icon:last" ).attr( "class" ), "ui-icon custom-down" );
+});
+
test( "incremental, false", function() {
expect( 100 );
widgetEventPrefix: "spin",
options: {
culture: null,
+ icons: {
+ down: "ui-icon-triangle-1-s",
+ up: "ui-icon-triangle-1-n"
+ },
incremental: true,
max: null,
min: null,
_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>";
},