I attempted using the slideToggle() function to create a submenu, but unfortunately, it's not functioning as expected. After viewing some examples, I noticed that it was used on <div>
elements and not <ul>
elements. Could it be that this function only works with <div>
elements? You can find my code on Fiddle here: Fiddle
I have ensured that I am correctly inserting the <script>
tags in my HTML file, and all my other jQuery codes are running smoothly.