0
我正在從自定義Drupal模塊加載一個簡單的jquery腳本。部分響應Drupal jQuery腳本
瀏覽器網絡數據確認我的腳本已成功加載,但我的簡單單擊未檢測到檢測嘗試。 A console.log消息確實響應但不是功能。我的代碼如下:
(function ($) {
$('body').click(// unresponsive
function(){
alert('responding');
}
);
console.log('Responding'); // this works
jQuery('input#edit-search').click(// unresponsive
function(){
alert('testing ... testing!');
}
);
})(jQuery);