Skip to main content
3 events
when toggle format what by license comment
Sep 16, 2011 at 6:50 comment added Sang Le Thanh drupal_add_js is the low level to add a Javascript file. script[]='mymodule.js' will always add Javascript file to Drupal, can't lazy load. hook_library allow your module and other module can add Javascript, CSS file which version support in easy way and when you need to upgrade your Javascript source (and keep current source), only one modify need.
Sep 16, 2011 at 3:43 comment added Srihitha Narra Sorry my mistake, there is one more file being added with correct extension because of the typo in my .info file. By the way, is there any difference between these methods? drupal_add_js, drupal_add_library and script[] ='mymodule.js' in info file?
Sep 16, 2011 at 3:40 history answered Sang Le Thanh CC BY-SA 3.0