$(document).ready(function() {
/* Tooltip */
new jBox('Tooltip', {
attach: '#Tooltip-1',
content: 'This is a basic jBox tooltip'
});
new jBox('Tooltip', {
attach: '#Tooltip-2',
theme: 'TooltipBorderThick',
width: 200,
position: {
x: 'left',
y: 'center'
},
outside: 'x',
pointer: 'top:15',
content: 'You have many options to position and animate your jBoxes',
animation: 'move'
});
new jBox('Tooltip', {
attach: '#Tooltip-3',
theme: 'TooltipDark',
animation: 'zoomOut',
content: 'Use themes to change appearance',
});
new jBox('Tooltip', {
attach: '#Tooltip-4',
width: 300,
pointer: 'right:80',
animation: 'move',
delayOpen: 1000,
delayClose: 2000,
content: 'This tooltip waits 1 second to open and closes after 2 seconds',
onOpen: function() {
this.source.removeClass('active').html('Hover me');
},
onClose: function() {
this.source.removeClass('active').html('Hover me');
}
});
new jBox('Mouse', {
attach: '#Tooltip-5',
position: {x: 'right', y: 'bottom'},
content: 'I will follow you!'
});
new jBox('Tooltip', {
attach: '#Tooltip-6',
width: 280,
closeOnMouseleave: true,
animation: 'zoomIn',
content: 'I won\'t close when you move your mouse over me'
});
new jBox('Tooltip', {
attach: '#Tooltip-7',
target: '#Tooltip-1',
theme: 'TooltipBorder',
trigger: 'click',
adjustTracker: true,
closeOnClick: 'body',
closeButton: 'box',
animation: 'move',
position: {
x: 'left',
y: 'top'
},
outside: 'y',
pointer: 'left:20',
offset: {
x: 25
},
content: 'You can position your tooltips at any element.
Scroll up and down to see this tooltip flip position!',
onOpen: function() {
this.source.addClass('active').html('Now scroll');
},
onClose: function() {
this.source.removeClass('active').html('Click me');
}
});
new jBox('Tooltip', {
attach: '#Tooltip-8',
theme: 'TooltipBorder',
trigger: 'click',
width: 200,
height: ($(window).height() - 160),
adjustTracker: true,
closeOnClick: 'body',
closeOnEsc: true,
animation: 'move',
position: {
x: 'right',
y: 'center'
},
outside: 'x',
content: 'Scroll up and down or resize your browser, I will adjust my position!
Press [ESC] or click anywhere to close.',
onOpen: function() {
this.source.addClass('active').html('Now scroll');
},
onClose: function() {
this.source.removeClass('active').html('Click me');
}
});
/* Modal */
new jBox('Modal', {
attach: '#Modal-1',
height: 200,
title: 'I\'m a basic jBox modal window',
content: '