// 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.length; i++) {
ui.add('<a href="'+ itemList[i].url +'" target="_blank">'+ itemList[i].title +'</a>');
}
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')) {