0

是小提琴。我试图允许用户选择一个范围(如果他们选择多次),它会显示时间范围内的位置。我无法让开始日期输入范围多次工作,尽管它正在更改。开始日期选择器代码是这样的:

//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);
    });

关于为什么它不会多次工作的任何线索?结束选择器多次工作。

4

1 回答 1

1

您的问题出在您的processCompanyTime功能中,该功能有条件隐藏section.company但不显示它。因此,当它被隐藏时,它将永远不会再次显示。

于 2012-06-20T16:54:07.757 回答