Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
Hi. I'm adding some jQuery to my theme that tracks events for Google Analytics. It works when wrapped in document.ready, but not in Drupal.behaviors, and I'm not sure why.
This works:
jQuery(document).ready(function() {
var page = document.URL;
var tabTitle = cleanText(jQuery(this).text());
ga_event(['Tabs', '"' + tabTitle + '" tab clicked', page]);
});
Issue I am facing is that IE (7,8) cuts the navigation menu to 4 items. Having 5 menu items that display fine in Firefox, Chrome and Safari. Building my own theme on a 960 grid with the nav being Superfish enhanced, all on localhost.
I tried to add Bootstrap to Drupal 8 and enable the Bootstrap theme. Bootstrap enables but throws the following error : Uncaught PHP Exception Twig_Error_Runtime: "An exception has been thrown during the rendering of a template ("Object of type "Drupal\\Core\\Field\\FieldItemList" cannot be printed.") in "sites/all/themes/bootstrap/templates/page.html.twig" at line 80." at /var/www/core/vendor/twig/twig/lib/Twig/Template.php line 278
Can anyone please help to resolve this ?
I am working on a Drupal 6 theme which uses the Zurb Foundation 4 framework. The problem I have is ideally Foundation 4 requires jQuery version 1.10.2. Drupal 6 only supports up to jQuery version 1.3.2 using the jQuery Update module. Upgrading to Drupal 7, unfortunately isn't an option. I have search through forums and tried a number of the suggested solutions but I can't seem to get both versions of jQuery to function without either breaking Core or Zurb Foundation functionality. Please, I am really need someone help.