Here's the basic structure of one option, I'm not sure how your questions differ (do they all have 3 options?) so the styling would vary, just trying to demonstrate the concept.
I'm not sure what each question is contained in, so I put your content in a <div class="question">
, then gave the inputs labels (degrades a bit better for non-JS users), like this overall:
<div class="question">
<h2>How long is your hair?</h2>
<label><input type="radio" name="71" value="98">Short</label>
<label><input type="radio" name="71" value="99">Medium</label>
<label><input type="radio" name="71" value="100">Long</label>
</div>
Then a bit of script to transform it into a slider, like this:
$(".question").each(function() {
var radios = $(this).find(":radio").hide();
$("<div></div>").slider({
min: parseInt(radios.first().val(), 10),
max: parseInt(radios.last().val(), 10),
slide: function(event, ui) {
radios.filter("[value=" + ui.value + "]").click();
}
}).appendTo(this);
});
You can give it a try here
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…