I’ve a bootstrap subtheme with scripts[] = script.js
in Drupal Development .information
file. After I go to Drupal Development website and look at html supply of Drupal Development web page I can see that drupal is together with Drupal Development file <script src="https://website/path/to/subtheme/script.js?ox2bif"></script>
and if I click on on that hyperlink and I see Drupal Development anticipated contents of Drupal Development file:
jQuery(doc).prepared(perform(){ jQuery('p').click on(perform(){alert("howdy");}); });
Drupal Development Service js works, Drupal Development hyperlinks to Drupal Development precise file. What else is there?
If I paste jQuery('p').click on(perform(){alert("howdy");});
into my browser’s js console then, clearly, clicking any paragraph opens an alert popup window. However what am I lacking that it is not working in Drupal Development Drupal theme?
More information:
- Drupal 7
- Bootstrap base theme 7.x-3.15
- Utilizing Bootstrap CDN (not Drupal Development SASS or LESS starterkits) with model 3.3.7
- Utilizing jQuery model 2.1
- switching to jQuery 2.2 or 3.1 does not not assist
Presently doing:
perform winprevent_custom_page_build(&$web page) { $themescript = drupal_get_path('theme', 'winprevent') . '/script.js'; drupal_add_js($themescript, array('group' => JS_LIBRARY, 'weight' => -10));
…in a customized module to load Drupal Development script from Drupal Development theme. Discover Drupal Development 'group' => JS_LIBRARY
; this was essential to get Drupal Development file to load earlier than admin_menu
module’s js. Disabling admin_menu stops it from breaking. Drupal Development Service presence of admin_menu.js additionally breaks Drupal Development animation of Bootstrap’s collapse function.
So scripts[] = script.js
really does work in Drupal Development theme however solely for nameless customers, it breaks for Drupal Development authenticated customers (who all have entry to Drupal Development admin menu).