KevinBatdorf / liquidslider

A Responsive jQuery Content Slider
161 stars 63 forks source link

IE8: Object doesn't support property or method #130

Closed ilabcrossmedia closed 9 years ago

ilabcrossmedia commented 10 years ago

IE8 seems to have a problem with liquid slider (jQuery 1.11.1, LS 2.3.2). We tracked the code and located a jQuery-dependent reason for the error message. The problem is the function LiquidSlider.convertRegex(input). The jQuery-trim-function is the vermin, causing problems in IE8.

The solution would be to alter the code:

return input
  .trim()
  .replace(/[^\w -]+/g,'')
  .replace(/ +/g,'-')
  .toLowerCase();

to

return jQuery.trim(input)
  .replace(/[^\w -]+/g,'')
  .replace(/ +/g,'-')
  .toLowerCase();

This works in IE8 and all modern browsers.

Btw: Why do the version numbers in the sourcecode and in the minified release version differ?

KevinBatdorf commented 10 years ago

Thanks, this should be updated already.