1). I'm not sure how to get the .candle
(stick) to snap/drop onto the bar. Is there a way to combine the two divs so when I drag the item divs, the bottom of the candle/bar is the part that the snap function recognises?
I was hoping I could attach something like;
but I'm not sure if it's possible?
2). I can alert the number of the value, however I'm not sure how to display the value inside the div?
drop: function (e, ui) { var finalMidPosition = $(ui.draggable).position().left + Math.round($(divs).width() / 2); if (finalMidPosition >= minX && finalMidPosition <= maxX) { var val = Math.round((finalMidPosition - minX) / tickSize); sliderDiv.slider("value", val); alert(val + "%"); } }