Menu icon Foundation
How to change slider end value on click?

Hello, 

I am trying to change the data-end value for the slider from 3000 to 8000 with a click event, the attribute changes however the slider still moves to 3000. How can i implement this? thank you

code

$("#button").on("click", function() {
slider.attr("data-end", "8000");
});

Foundationsliderjavascriptjquery

Hello, 

I am trying to change the data-end value for the slider from 3000 to 8000 with a click event, the attribute changes however the slider still moves to 3000. How can i implement this? thank you

code

$("#button").on("click", function() {
slider.attr("data-end", "8000");
});