pbauerochse / searchable-option-list

a jquery plugin for a searchable optionlist
MIT License
79 stars 54 forks source link

IE8 doesn't support trim #9

Closed fc closed 8 years ago

fc commented 9 years ago

Was doing some cross-browser testing and IE8 apparently doesn't have trim support which is used a few times.

If you choose to include the trim prototype, you could use this:

if(typeof String.prototype.trim !== 'function') {
  String.prototype.trim = function() {
    return this.replace(/^\s+|\s+$/g, ''); 
  }
}

if you choose to test IE8, you can download a virtual machine image here: https://www.modern.ie/virtualization-tools

pbauerochse commented 8 years ago

Hi @fc,

thanks for the provided fix. I just included it in the most recent sol.js. I wasn't aware that sol even slightly works in IE8 :D

Cheers

Patrick