diff --git a/tests/visual/spinner.html b/tests/visual/spinner.html index f5b441e26..c3f12ad29 100644 --- a/tests/visual/spinner.html +++ b/tests/visual/spinner.html @@ -36,7 +36,7 @@ $(function(){ // Two methods of adding external items to the spinner // // method 1: on initalisation call the add method directly and format html manually - init: function(ui) { + init: function(e, ui) { for (var i=0; i'+ itemList[i].title +''); } diff --git a/ui/ui.spinner.js b/ui/ui.spinner.js index 572611b5d..94e2e00f2 100644 --- a/ui/ui.spinner.js +++ b/ui/ui.spinner.js @@ -18,9 +18,7 @@ $.widget('ui.spinner', { if($.data(this.element[0], 'spinner')) return; // check for Init callback - if (this.options.init) { - this.options.init(this.ui(null)); - } + this._trigger('init', null, this.ui(null)); // perform data bind on generic objects if (typeof this.options.items[0] == 'object' && !this.element.is('input')) {