Итак, у нас был такой код:
function handleDayClick(date)
{
if (date.local() < startDate || date.local() >= endDate) {
$("#dayClickMsg").show();
return;
}
$('#dayClickMsg').hide();
//do other stuff
}
и немного HTML:
<div id="dayClickMsg" hidden style="color:seagreen; float:right">
Clicked day not in range.
</div>
Но после обновления функция, похоже, не работает.Установка точки останова в .show () говорит мне, что элемент выбирается правильно, но вызов метода .show () не работает.Точно так же .hide () также не работает.
Редактирование, ошибки консоли:
sign-error-icon.png:1 Failed to load resource: the server responded with a status of 404 ()
help-icon.png:1 Failed to load resource: the server responded with a status of 404 ()
popper:37 Uncaught SyntaxError: Unexpected token export
sign-error-icon.png:1 Failed to load resource: the server responded with a status of 404 ()
help-icon.png:1 Failed to load resource: the server responded with a status of 404 ()
Редактирование: Возможно, связано с https://jquery.com/upgrade-guide/3.0/#breaking-change-show-hide-and-toggle-methods-now-respect-more-stylesheet-changes