jQuery LavaLamp default element tests

protocol: | port: | host: | hostname:

href: | pathname:

hash: | search:

LavaLamp's order of precedence for starting hover location:
  1. startItem
  2. class="selected Lava"
  3. home element and returnHome is true
  4. location match with contained URI
  5. first element in list

1. startItem test

$('ul#manualtest').lavaLamp({startItem: 3});

2. selectedLava (& noLava) class tests

<li class="selectedLava"><a href="/projects/lavalamp/urltest/">trailing slash</a></li>

3. home element test

$('ul#hometest').lavaLamp({homeTop:100, homeLeft:100, returnHome:true});

URL Combination tests

Important note about automatic link matching: LavaLamp does its best to correctly match relative anchor links, eg. <a href="folder/file.html"> inside a set of menu items using the current page location information available from the browser DOM. However, for best results use absolute path links in your LavaLamp menu: eg. <a href="/folder/file.html"> (The forward slash at the beginning of the href link is what defines an absolute path.)

download LavaLamp for jQuery

copyright (c) 2008, 2009 Jolyon Terwilliger / Nixbox Web Designs

feel free to reuse this code anyway you see fit in your own projects, understanding that you assume all responsibility upon usage.