Topic: Why is not expand/collapse working as the demo?

patlar free asked 2 years ago

Expected behavior Expand/collapse is not working. Running development on a Docker container with Nginx and PHP (richarvey/nginx-php-fpm). The browser's development tools do write out the hidden div:s but expanding the row to view them does not work

Actual behavior Expand/collapse functioning as intended

Resources (screenshots, code snippets etc.) Followed guide:

Running the code from the linked guide with this header (and of course closing HTML tags):

    <meta http-equiv="refresh" content="<?php echo $sec?>;URL='<?php echo $page?>'">

    <!-- Font Awesome -->
    <link href="" rel="stylesheet"/>
    <!-- Google Fonts -->
    <link href=",400,500,700&display=swap" rel="stylesheet"/>
    <!-- MDB -->
    <link href="" rel="stylesheet"/>
    <!-- MDB -->
    <script type="text/javascript" src=""></script>
    <link href="stylesheet.css" rel="stylesheet"/>

patlar free answered 2 years ago

Ah, I see. Many thanks for your help!

Grzegorz Bujański staff answered 2 years ago

This example does not work because it was created for MDB4 jQuery but you are using MDB5. You need to update the data attributes. For example, in MDB5, the data-toggle="collapse" attribute it also has mdb and looks like this: data-mdb-toggle="collapse"

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 4.2.0
  • Device: Macbook Pro
  • Browser: Google Chrome
  • OS: MacOS
  • Provided sample code: No
  • Provided link: Yes