andreruffert / rangeslider.js

🎚 HTML5 input range slider element jQuery polyfill
https://rangeslider.js.org
MIT License
2.16k stars 401 forks source link

JSPM error #190

Closed linnett closed 8 years ago

linnett commented 8 years ago

This doesn't seem to be working with JSPM. I installed via 'jspm install' and imported the plugin. However, it appears to be returning an empty object. Is there a way around this?

andreruffert commented 8 years ago

I never used JSPM but since it's a jQuery Plugin you should be able to use it in jQuery context after importing it.

e.g.

import $ from 'jquery';

// Load the plugin (make it available in jQuery).
// `rangeslider` will be `undefined` but that's ok :) 
import rangeslider from 'rangeslider.js'; 

// initialize the plugin
$('input[type="range"]').rangeslider({polyfill: false});
linnett commented 8 years ago

Hi @andreruffert - thanks for the speedy response. It is now working! I believe I was referencing the file incorrectly. Thanks so much for the help and apologies for wasting your time :).