Skip to content
Michael edited this page Sep 28, 2016 · 2 revisions

HTML In Button Label

Do you want to put HTML in your button label? You can! Just remember that this opens you up to XSS vulnerabilities.

By overriding the _setButtonValue method of the widget you can allow HTML in all the multiselect widgets on your page. For example:

$( "#foo" ).multiselect().data( "echMultiselect" )._setButtonValue = function( value ) {
   this.buttonlabel.html( value );
};

The parameter value being passed in contains the text being updated.

Clone this wiki locally