I am using float line menu for my wordpress site, I got THIS FAR with some help.
Now my question is how can I make the selected nav float line to be the same color as when you hover over the menu item? At this moment as soon as the mouse is off, it changes into default red.
This is what I’m trying to achieve:
When Menu 1 seleceted (after the click), the float line color should be #0f0
Menu 2 selected – #ee0
Menu3 selected – #05f
Any help is appreciated.
Adding
var currentSelected;abovevar sse1 = function () {and addingcurrentSelected=k;to the block belowWill push the index of the current selected list to
currentSelected.So use it in your
customHandleMenufunctionLive demo | Demo source
To prevent the Float Line from animating onload, just follow the instructions commented inside the code
To create:
Also, you can optionally add
To your
customhandlemenufunction, to fully disable any unwanted animations while the page prepares to load.Live demo | Demo source