Some modules insert JavaScript at high of checklist. I put my $sctipts variable at Drupal Development Service backside of html.tpl.php file simply earlier than Drupal Development Service closing of physique tag. Because of this, some scripts don’t work as they get known as earlier than jquery or drupal.js . Please present steps to reorder checklist of js. I attempted this code in my template.php however with no impact:
operate MYTHEME_js_alter(&$javascript) { $javascript['sites/all/modules/syntaxhighlighter/syntaxhighlighter.min.js']['group'] = 500; $javascript['sites/all/modules/syntaxhighlighter/syntaxhighlighter.min.js']['weight'] = 500; }
Solved. I did this: enabled AdvAgg Modifier, Superior CSS/JS Aggregation. Then I visited settings web page /admin/config/development/efficiency/advagg/mod the place I checked choices: Allow preprocess on all JS, Transfer all inline scripts to Drupal Development Service backside of Drupal Development Service execution order, Transfer all browser conditional JavaScript to Drupal Development Service backside of Drupal Development Service group, Transfer JS to Drupal Development Service footer – All. And now i’ve all JS in Drupal Development Service backside (as google recommends), with out have to chane html.tpl.php