这个问题真的很简单。使用JQuery UI,当我们datepickers在我们的应用程序中有多个分布时,我们可以使用以下方式为所有这些设置默认选项:
$.datepicker.setDefaults({
showOtherMonths: true,
selectOtherMonths: true,
changeMonth: true,
changeYear: true
});
我怎样才能对所有autocomplete领域做到这一点?
我想将delay所有它们的默认值设置为 1 秒。
我试过什么?这个,没用。
$.autocomplete.setDefaults({
delay: 1000
});
显然该autocomplete对象没有该setDefaults方法。