Results 1 to 1 of 1

Thread: jQuery and Mootools on the same page

  1. #1
    New user
    Join Date

    Default jQuery and Mootools on the same page

    I am working on a Contao site that is supposed to be upgraded from 2.11.6 to 3.5.40 because the provider will soon force a PHP upgrade from 5.6 to 7.3. The upgraded site should look and feel like the old site.

    I have already done the Contao upgrade, and all pages look fine except the home page, which uses two extensions:

    • MenuMatic 0.68.3 for the main navigation (all pages use this)
    • FlexSlider 1.4.3 directly underneath the menu (only on the home page)

    MenuMatic uses Mootools, FlexSlider uses jQuery. The two extensions don't seem to work together. If I enable only Mootools, the menu works (hovering over one of the top elements drops down the submenu); if I add the FlexSlider content element with jQuery, the slider works, but not the menu dropdown. I haven't found a slider that runs with Mootools on contao 3.5.

    MenuMatic injects these scripts on the page: see attachment1
    Screen Shot 2020-02-26 at 22.33.25.png

    This is what I tried:

    • use a pure CSS menu: works on a simple html page, not on the Contao home page – no dropdown
    • insert jQuery.noConflict() in the FlexSlider script that appears in the page html
    • wrapping flexslider.js with jQuery(document).ready(function( $ ) { ... });

    flexslider.js with noConflict: see attachment2
    Screen Shot 2020-02-26 at 22.33.38.png

    Can you help?
    Last edited by trebitzki; 02/26/2020 at 22:41.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts