Using jQuery variables in a third party javascript library

73 Views Asked by At

I'm making a page that relies on jQuery as well as a library called noUiSlider.

I would like to be able to use variables (for example: $slider1) created with jQuery in noUiSlider code but to no avail based on what I've tried so far: JSFiddle example

What am I doing wrong? Thanks!

1

There are 1 best solutions below

1
On BEST ANSWER

I've updated your code in jsfiddle.

you just need to change $slider1 to $slider1[0]