Skip to content

Commit

Permalink
Eliminate unnecessary function calls
Browse files Browse the repository at this point in the history
Eliminate unnecessary function calls to improve performance--extra addClass() calls not needed.
  • Loading branch information
SteveTheTechie authored and mlh758 committed Jan 5, 2018
1 parent 363dc10 commit 786ffc1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/jquery.multiselect.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@
this.multiselectID = multiselectID++;

var button = (this.button = $('<button type="button"><span class="ui-icon ui-icon-triangle-1-s"></span></button>'))
.addClass('ui-multiselect ui-widget ui-state-default ui-corner-all')
.addClass(o.classes)
.addClass('ui-multiselect ui-widget ui-state-default ui-corner-all ' + o.classes)
.attr({ 'title':el.attr('title'), 'tabIndex':el.attr('tabIndex'), 'id': el.attr('id') ? el.attr('id') + '_ms' : null })
.prop('aria-haspopup', true)
.insertAfter(el);
Expand All @@ -92,8 +91,7 @@
.appendTo(button);

this.menu = $('<div />')
.addClass('ui-multiselect-menu ui-widget ui-widget-content ui-corner-all')
.addClass(o.classes)
.addClass('ui-multiselect-menu ui-widget ui-widget-content ui-corner-all ' + o.classes)
.appendTo(this._getAppendEl());

this.header = $('<div />')
Expand Down

0 comments on commit 786ffc1

Please sign in to comment.