0
我總是遇到函數live()的問題,但我仍然不明白如何使用它。 (我可以把它與日期選擇工作,但不是自動完成)在加載的輸入上應用自動完成
我想上加載輸入應用此腳本:
$("input.autocomp").autocomplete({
source: ["example 1", "example 22", "example 33",]
});
該腳本正常工作在現有的投入。
任何人都可以幫助我嗎?
感謝
PS:此腳本正常工作與加載輸入。
$(function(){
$('input.datepicker-inline').live('click', function() {
$(this).datepicker({
showOn:'focus',
showButtonPanel: true,
changeMonth: true,
changeYear: true,
firstDay: 1,
dateFormat: 'yy-mm-dd',/*'dd/mm/yy'*/
}).focus();
});
})
謝謝Tentonaxe!它的工作;) –
感謝您的更新。我打算添加.on更新,但是你打敗了我。 – MattSizzle