/** Spinner. A wrapper for FuelUX spinner element. It's just a wrapper so you still need to include FuelUX spinner script first. */ (function($ , undefined) { //a wrapper for fuelux spinner function Ace_Spinner(element , _options) { var attrib_values = ace.helper.getAttrSettings(element, $.fn.ace_spinner.defaults); var options = $.extend({}, $.fn.ace_spinner.defaults, _options, attrib_values); var max = options.max max = (''+max).length var width = parseInt(Math.max((max * 20 + 40) , 90)) var $element = $(element); var btn_class = 'btn-sm';//default var sizing = 2; if($element.hasClass('input-sm')) { btn_class = 'btn-xs'; sizing = 1; } else if($element.hasClass('input-lg')) { btn_class = 'btn-lg'; sizing = 3; } if(sizing == 2) width += 25; else if(sizing == 3) width += 50; $element.addClass('spinbox-input form-control text-center').wrap('