Topic: Where to place javascript

G T free asked 3 years 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 years 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.


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 jQuery
  • MDB Version: 4.18.0
  • Device: Desktop
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: Yes