OverHang.js

A JQuery plugin that displays sleek, instant notifications,
confirmations or prompts inside a given element.







Usage



Examples

Notifications

To display a notification, the activity needed is "notification".


$("body").overHang({
	// The activity
	activity : "notification",
	// Use default duration (1.5)
	// duration : 1.5,
	// Custom message
	message : "Hello World!",
	// Custom color or theme
	col : "alizarin"
})

Prompts

To get an input, the activity needed is "prompt".
The input is then stored as string in the data of the DOM element ("overHangPrompt").
[In this case, the 'body']


$("body").overHang({
	// The activity
	activity : "prompt",
	// Custom message
	message : "Enter your name",
	// Custom color or theme
	col : "amethyst"
})

Confirmations

To get a yes/no confirmation, the activity needed is "confirmation".
The confirmation is then stored as a boolean in the data of the DOM element ("overHangConfirm").
[In this case, the 'body'].


$("body").overHang({
	// The activity
	activity : "confirmation",
	// Custom message
	message : "Are you sure?",
	// Custom color or theme
	col : "flower"
})