Where to place javascript

Topic: Where to place javascript

G T pro premium asked 3 months ago

Hi there.. being new to MDB, I am here to ask a newbie question - have general understanding of HTML, CSS, JS etc.. but find myself a little confused.

I have attempted to use a few features yet when they show JavaScript to implement I can't seem to get this to work. Example: Treeview


This gives the JS to add:

// Treeview Initialization$(document).ready(function() { $('.treeview').mdbTreeview();});

I put this at the bottom of my page where it says: Your custom scripts (optional)

This does nothing to assist the treeview... What would I be doing wrong?

Thanks in advance :)

Grzegorz BujaƄski staff commented 3 months ago

Hi. Everything seems to be working. You can check it easily. Delete the JS code and try to expand one of the treeview options. After removing the js code, treeview should not work. When you add the js code again, everything will work.

Please insert min. 20 characters.


Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: jQuery
  • MDB Version: 4.18.0
  • Device: Desktop
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: Yes