Submitted by roopa on Wed, 07/11/2012 - 3:05am
hey.., i don't know how to add my .js file in drupal7...!
i read the above article.. but as am new to drupal7 i don't how to:
1. find the body-class
2. manipulating "$options = array('type' => 'file');" appropriately for java-scripts
3. also.. i don't know what to do with the below code with-respect-to my java-script file: (my file is "test.js")
if ((in_array('section-profile', $vars['classes_array']))) {
//Load the js file.
drupal_add_js(drupal_get_path('theme', 'yourtheme'). '/js/profile.js', $options);
Kindly help me by replying appropriately... very urgent.... need to launch the website in another 2days...!
Thanks in advance.
