Collapsible option of Materialize does not work correctly

0

I'm using the Materialize Framework to display a list.

This list can be expanded, but only works after reloading the browser several times with CTRL + F5.

When I load directly into HTML, it works, but when I load the list into JavaScript, it only reloads multiple times.

I use Jquery, Materialize and Google Maps API, I already removed the Google Maps script but it did not solve.

Attempts

  • I have tried to load the script randomly: script.js? random = uniquid ();
  • Use no-cache in html

I have inspected the html element of the list and it loads all the tags, even the log does not report any errors.

I'm using $ (document) .ready (function () {})

    
asked by anonymous 11.03.2018 / 16:54

1 answer

0

In tests that I performed, I noticed that the statically added elements worked correctly, so I tried to add the $('.collapsible').collapsible(); command after inserting the elements, by JavaScript and it worked correctly.

    
11.03.2018 / 18:44