Where to place javascript


Topic: Where to place javascript

G T asked 5 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

https://mdbootstrap.com/snippets/jquery/g_t/2098850

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 5 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.

FREE CONSULTATION

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

Status

Open

Specification of the issue
  • User: 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