drupal.behavior 和 document.ready 没有直接的关系

所有的js代码都要在document.ready之后运行
不然可能运行过早了
就好比在firebug里运行正常
但在文件里加载就可能不行了
--
Drupal.behaviors.xxx OVER document.ready.

 https://www.lullabot.com/articles/understanding-javascript-behaviors-in-drupal

posted @ 2015-11-12 17:23  qqisnow2021  阅读(171)  评论(0编辑  收藏  举报