\r
module("spinner: options");\r
\r
-test("numberformat, number", function() {\r
+test("numberFormat, number", function() {\r
var el = $("#spin").spinner({\r
value: "1",\r
- numberformat: "n"\r
+ numberFormat: "n"\r
});\r
equal(el.val(), "1.00");\r
});\r
\r
-test("numberformat, number, simple", function() {\r
+test("numberFormat, number, simple", function() {\r
var el = $("#spin").spinner({\r
value: "1",\r
- numberformat: "n0"\r
+ numberFormat: "n0"\r
});\r
equal(el.val(), "1");\r
});\r
\r
-test("numberformat, currency", function() {\r
+test("numberFormat, currency", function() {\r
var el = $("#spin").spinner({\r
value: "1",\r
- numberformat: "C"\r
+ numberFormat: "C"\r
});\r
equal(el.val(), "$1.00");\r
});\r
test("step, 0.7", function() {\r
var el = $("#spin").spinner({\r
step: 0.7,\r
- numberformat: "n1"\r
+ numberFormat: "n1"\r
});\r
equals(el.val(), "0.0", "value initialized to");\r
\r
incremental: true,
max: null,
min: null,
- numberformat: null,
+ numberFormat: null,
page: 10,
step: null,
value: null
_parse: function( val ) {
if ( typeof val === "string" ) {
- val = $.global && this.options.numberformat ? $.global.parseFloat( val ) : +val;
+ val = $.global && this.options.numberFormat ? $.global.parseFloat( val ) : +val;
}
return isNaN( val ) ? null : val;
},
_format: function( num ) {
- this.element.val( $.global && this.options.numberformat ? $.global.format( num, this.options.numberformat ) : num );
+ this.element.val( $.global && this.options.numberFormat ? $.global.format( num, this.options.numberFormat ) : num );
},
destroy: function() {