Now this question has been asked before but I am not able to get the answer. I have a Lavalamp with 4 LI inside it, clicking on each of them loads some content in a div.
It works all fine. Now I have a hyperlink somewhere on the same page outside of that lavalamp. I want that, when I click on that link, the lavalamp highlight should move to a particular li and remain there.
To make myself clear, I have a Lavalamp LI that goes like this: Home, Work, About, Contact. And I also have a 'contact' link somewhere on the page. When I click 'contact' link, the lavaLamp should move the highlight from wherever it is to the 4th option 'Contact'.
If you are using this lavalamp plugin, you'll need to use
trigger()
to activate the mouseenter and click events... here is a demo.HTML
Script
LOL, ok, since you are using the other lavalamp plugin... here is the code you can use. Also, since the lavaplamp plugin provides a click function, I have made the javascript unobtrusive by adding the function there (new demo).
HTML
Script