To get a data attribute using jQuery's data()
you have to write it in lowercase like lpscore
.
Here a deep explanation of the rules applied by data Using data attributes with jQuery
Code:
$(".lp-slider").each(function () {
var value = $(this).data("lpscore");
$(this).slider({
value: value,
range: "min",
min: 1,
max: 100,
step: 1
});
});