The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › Mobile responsive menu – sub menu not working
I have developed this site: http://bellamedica.co.uk/dev/
The problem I have is the sub-menu doesnt seem to work. When I try to click on treatments to open the sub-menu it goes on the page instead. Any help would be greatly appreciated.
Thank You.
I am not asking for the code but just some help on what to do.
Can you put the menu in a reduced CodePen demo? It’s easier for us to look at there and test/edit code on the fly.
It does work but it is forcing close right after you click it. As Beverleyh said. If you put it in CodePen, we can take a better look.
try this
$( document ).ready(function() { var linkPart = window.location.href.substring(window.location.href.lastIndexOf('/') + 1); console.log(linkPart); $('a[href="'+linkPart+'"]').next('ul').toggleClass("show-ul"); });