IonDen / ion.rangeSlider

jQuery only range slider
http://ionden.com/a/plugins/ion.rangeSlider/en.html
MIT License
2.55k stars 506 forks source link

Update to 2.1.4 now says that ionRangeSlider is not a function in Aurelia #374

Closed cdaniel77 closed 7 years ago

cdaniel77 commented 8 years ago

The slider was working perfectly in 2.1.3 but since I upgraded. I cannot get the slider to work with Aurelia. I keep getting that the $(...).ionRangeSlider is not a function error.

import 'ion-rangeslider';

export class MyClass{
    $('#dateRangeSlider').ionRangeSlider();
}
IonDen commented 8 years ago

Maybe you forgot to import jquery here?

cdaniel77 commented 8 years ago

jQuery is installed or it wouldn't have worked with 2.1.3.

IonDen commented 8 years ago

Please check this commit: https://github.com/IonDen/ion.rangeSlider/pull/369/files if think it brakes your code. What do you think about it?

Robert-W commented 8 years ago

Hi I can confirm the same issue, I was on 2.1.2 and everything worked. I am also getting multipleDefine errors in our application which is using the Esri JavaScript API (built on Dojo so it uses Dojo's AMD loader). I can confirm we load jQuery as a script before we load the Esri API with dojo's loader.

I definitely agree that the commit you linked has something to do with it. I can fix the multipleDefine error by aliasing jquery in my dojoConfig like so:

var dojoConfig = {
  parseOnLoad: false,
  async: true,
  packages: [
    ....
  ],
  aliases: [
    ['jquery', 'vendor/jquery/dist/jquery.min.js'],
    ....
  ],
  deps: ['dojo/domReady!'],
  callback: function () {require(['js/main']);}
};

However that does not fix the TypeError: $(...).ionRangeSlider is not a function error

IonDen commented 8 years ago

Ok, i will investigate this more.

IonDen commented 7 years ago

Should be fixed in 2.1.5