0
Here은 바이올린입니다. 사용자가 범위를 선택하도록 허용하려고합니다. (선택하면 여러 번) 시간 프레임 내의 위치를 보여줍니다. 변경 날짜에도 불구하고 시작 날짜 입력 범위를 두 번 이상 사용할 수 없습니다. 시작일 선택기 코드는 다음과 같습니다.시작 날짜 범위의 JQuery show()/hide() selector
//start selector functionality
$('#startdate').on('change', function() {
var $formelem = $(this);
// Hide all positions that end before the specified date.
$('section.position time.start').each(function() {
if (compareTime($(this).attr('datetime'), $formelem.val()) <= 0) {
$(this).parent().hide();
} else {
$(this).parent().show();
}
});
$('section.company > time').remove();
$('section.company').each(processCompanyTime);
});
두 번 이상 작동하지 않는 단서는 무엇입니까? 마지막 셀렉터는 여러 번 작동합니다.
: 경우 (start.length == 0 && end.length == 0) { \t \t \t \t $ (이) .hide(); \t \t \t} 행 : 경우 (start.length == 0 && end.length == 0) { \t \t \t \t $ (이) .hide(); \t \t \t} 다른 { \t \t \t \t $ (이) .show(); \t \t \t} 고맙습니다! –