jQuery LavaLamp Demos: Auto Home link tester

hash:

host:

hostname:

href:

pathname:

port:

protocol:

search:

Important note about relative links: Relative linking, eg. <a href="folder/file.html"> is notorious for causing several problems on production web pages. Currently, the relative link checking that LavaLamp does for the autohome feature is lazy, as it only checks from the final filename onward to see if there is a match. For instance, if you have two similar relative links in sub-folders on your website - let's say, links/index.html and files/index.html - the autohome feature will only see the index.html part for comparison, and will always stop on the first match. For now, it is best to use absolute pathing when providing links to autohome in a LavaLamp menu, eg. <a href="/folder/file.html"> - note the forward slash at the beginning of the href link; this is what makes it 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.