iTooltip Examples

Examples:

Simple tooltip.
Dynamic turn to the left.
HTML in the tooltip.
Image in the tooltip.

Use on page:

<span title="Simple tooltip.">Simple tooltip.</span>
<span title="<i>HTML</i> in the <b>tooltip</b>.">HTML in the tooltip.</span>

<script src="/path/to/iTooltip.js"></script>
<script>
	// Apply to all elements with an attribute title.
	var tooltip = new iTooltip() // Or var tooltip = new iTooltip('*')
	tooltip.init()
</script>

// Change selector.
var tooltip = new iTooltip('.my-selector')
tooltip.init()

// Set options.
var tooltip = new iTooltip()
tooltip.init({
	className: 'my-class-name', // Changes the class name for a block with a hint.
	indentX: 3, // Horizontal indent. (In pixels)
	indentY: 3 // Vertical indent. (In pixels)
})

Default options:

Change the style for the tooltip:

.tooltip { /* or your class if changed */
	background-color: #282c34;
	color: #98c379;
	/* other styles */
}