[英]Why alert is not working though event is fired?
當我嘗試為表的未來行動態構造jquery-ui datepicker時。 我發現了一些奇怪的東西。 下面的代碼是問題。
$('#emp-table').live('focus','.obj-datepicker'function(){
alert('this is not working though function work');
$(this).datepicker({
isActiveX: true
}).next('a').click(function() {
$(this).prev().eq(0).datepicker("show");
});
})
我已經用谷歌搜索了這個奇怪的問題,但是沒有弄清楚。
為什么事件觸發后警報仍無法正常工作???
$('#emp-table').live('focus','.obj-datepicker'function(){
這是您要測試的確切代碼嗎? 我認為'.obj-datepicker'
之后缺少逗號,您可以刪除'.obj-datepicker'
試。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.