jBox is a jQuery plugin that makes it easy to create customizable tooltips, modal windows, image galleries and more.
Create a new instance of jBox Tooltip and attach it to elements:
Now elements with
class="tooltip" will open tooltips:
Hover me!Hover me!
You can set up modal windows the same way as tooltips. But most of times you'd want more variety, like a title or HTML content:
'Modal'width: 300height: 200attach: '#myModal'title: 'My Modal Window'content: '<i>Hello there!</i>';
Click me to open a modal window!
Confirm windows are modal windows which requires the user to confirm a click action on an element. Give an element the attribute data-confirm to attach it:
'Confirm'confirmButton: 'Do it!'cancelButton: 'Nope';
Click me!Click me!
A notice will open automatically and destroy itself after some time:
'Notice'content: 'Hurray! A notice!';
To create image windows you only need following few lines:
These few examples are very basic. The jBox library is quite powerful and offers a vast variety of options to customize appearance and behavior. Learn more in the documentation: https://stephanwagner.me/jBox/documentation