diff --git a/src/common.js b/src/common.js
index c2f3e0efb1..fc7da30b50 100644
--- a/src/common.js
+++ b/src/common.js
@@ -720,17 +720,17 @@
this.el = el;
} else {
this.el = jQuery('');
+ this.el.append(attributes.string || '');
}
this.icon = this.el.children('img');
if (!this.icon.length) {
- this.icon = jQuery('
').appendTo(this.el);
+ this.icon = jQuery('
').prependTo(this.el);
this.icon.hide();
}
this.el.addClass('btn btn-default');
this.el.attr('type', 'button');
this.icon.addClass('icon');
this.icon.attr('aria-hidden', true);
- this.el.append(attributes.string || '');
this.set_icon(attributes.icon);
},
set_icon: function(icon_name) {