0
我想創建一個函數來自動執行htmlwireups。頁面的某些部分使用ajax加載,我想調用一個函數來準備文檔和延遲加載的部分。將參數傳遞給jquery ready handler
實施例:
function WireHtml(target){
$(target).ready(function(target){
// call anything you would normally wire in a standard ready
// but only on the descendants of the target node such as wiring up
// an accordion
$(target).find(".accordion").accordion();
}
}
很酷的豆....只是一個令牌關 – 2010-12-10 21:37:44
我不相信'$()。ready'工作。 '$()'會返回一個空的jQuery對象,所以綁定事件處理程序應該不起作用。 – 2010-12-10 21:38:06
'$()。ready(function(){alert(1);});'回調函數何時執行?立即? – 2010-12-10 22:03:44