I want to attach "p-rating" to dynamic id to $("<div id='slider'></div>")
Expected result would be $("<div id='slider p-rating'></div>")
I wanted to get the value strictly from select parameter as I'm planning to that be dyanamic. SELECT holds that value: p-rating but how to pass that value? I wanted space between ids
function initiateSlider (select) {
var slider = $("<div id='slider'></div>").insertAfter( select ).slider({
...
})
}
$(function() {
var select = $("#p-rating"); //plan-preference slider
initiateSlider(select);
});