Posted By

chasecrawford on 06/13/12


Tagged

jquery drupal


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

AllKnightAccess


Drupal 7 Theming: Initialize JQuery Script


 / Published in: JavaScript
 

Use this no-conflict wrapper instead of the default ready function in JQuery to initialize scripts in your Drupal 7 theme

  1. (function ($) {
  2. Drupal.behaviors.YOURTHEMENAME = {
  3. attach: function(context, settings) {
  4.  
  5. /*Add your js code here*/
  6.  
  7. }
  8.  
  9. };
  10. })(jQuery);

Report this snippet  

You need to login to post a comment.