back to jQuery LavaLamp Demos Page

Custom target and container demo

$('div#articles').lavaLamp({
	target:'p',
	autoResize:true
});

View the source to see the empty a href inside each p element. This can be used to trigger LavaLamp's auto default start location feature with external links when providing the appropriate hash tag. For instance, here is a bookmark for Paragraph 3. Copy the link and paste it into a new browser window to see Lavalamp automatically highlight paragraph 3.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

The autoResize option tells lavaLamp to resize the backLava element to the selectedLava target upon any window or viewport resize event. Try resizing the window now to see how it works.
Thanks KV5R for the tip.

Definition List Target / Container Demo

$('dl#dlTargetDemo').lavaLamp({
	target: 'dd',
	autoResize:true,
	speed: 500
});

This sample targets definition lists or dl elements.

Earth
Mostly harmless.
Beer
A strange brownish fluid. It has very few remarkable properties, except that it is the sole diet of the entire student population of the Universe.
Dolphins
After mice, the second most intelligent species on Earth are the dolphins. Although dolphins had long known that Earth was about to be destroyed, their attempts to communicate this knowledge to humanity were misinterpreted as attempts to jump through hoops for bits of fish. They left the Earth just prior to its destruction, but left humanity one last message: a triple backwards somersault through a hoop whilst whistling the Star Spangled Banner, when, in fact, the message was this: 'So Long, and Thanks for All the Fish.'
Robot
A mechanical apparatus designed to do the work of a man. The marketing division of the Sirius Cybernetics Corporation defines a robot as 'Your plastic pal who's fun to be with.'
Sirius Cybernetics Corporation, Marketing Division
A bunch of mindless jerks who'll be the first against the wall when the revolution comes.

with apologies to Douglas Adams

protocol: | port: | host: | hostname:

href: | pathname:

hash: | search: