1
양식에 다른 입력과 함께 여러 슬라이더가 있습니다.jquery 슬라이더에서 유효성 검사
다른 모든 입력은 찾을 유효성을 검사하지만, 가진 문제 JQuery와 슬라이더를
코드를 확인하는 슬라이더 추가
여기$(".jSlider").each(function(){
var id = $(this).attr("id");
var sliderID = id + "_slider";
var newSlider = '<div style="padding-top:30px;padding-right:10px;background: #fff url(/images/scrollerBg.png) no-repeat;" id="sliderContainer" ><div style="background: #555" id="slider"></div></div><br />';
$(this).append(newSlider);
$(this).closest('fieldset').find('input:text').css("display", "none");
$("#slider", this).slider({
value:0,
min: 0,
max: 10,
orientation: "horizontal",
range: "min",
step: 1,
animate: true,
change: function(event, ui) {
$(this).closest('fieldset').find('input:text').val(ui.value);
// was adding error manually cause of background image being used
$(this).closest('fieldset').find('div.jSliderError').slideUp('fast', function(){
$(this).remove();
});
}
});
});
는
<fieldset class="q_default required jSlider fixFirefox" id="q_423" name="8) On a scale of 0 to 10 how did you like it?"><legend><span>8) On a scale of 0 to 10 how did you like it?</span></legend><ol><span class='help'></span>
<input id="r_8_question_id" name="r[8][question_id]" type="hidden" value="423" />
<input class="" id="r_8_answer_id" name="r[8][answer_id]" type="hidden" value="8782" />
<li class="string optional" id="r_8_string_value_input"><input id="r_8_string_value" maxlength="255" name="r[8][string_value]" type="text" /></li>
</ol></fieldset>
당신은이 점에 관해서는 잘 알고 있지만, 아직도 이해하려고 노력하고있는 새로운 보석으로 작업하고 있습니다. 그러나 당신은 저를위한 응답을 찾아 냈습니다. 숨겨진 필드에 addClass ('required');'를 추가하면 숨겨진 필드에 실제 값이 있음을 확인할 수 있습니다. ('input : text'). 입력 필드. 감사. – pcasa
도움이 되니 기쁩니다! :) – AlienWebguy