Tooltip Like Html Content Preview Plugin With jQuery Previewer - Download Tooltip Like Html Content Preview Plugin With jQuery - Previewer

Download Tooltip Like Html Content Preview Plugin With jQuery – Previewer

Posted on

This time I will share jQuery Plugin and tutorial about Tooltip Like Html Content Preview Plugin With jQuery – Previewer, hope it will help you in programming stack.

Tooltip Like Html Content Preview Plugin With jQuery Previewer - Download Tooltip Like Html Content Preview Plugin With jQuery - Previewer
File Size: 1.01 MB
Views Total: 1355
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Previewer is a jQuery plugin which enables the user to preview html content (text, images, videos) in a tooltip-style popup when mouse hover or click (tap).

How to use it:

1. Load the latest version of jQuery library and the jQuery previewer plugin’s script in the html document.

1 <script src="//code.jquery.com/jquery.min.js"></script>
2 <script src="dist/jquery.previewer.js"></script>

2. Create an image preview when you hover over the element ‘#demo1’

1 $('#demo1').previewer({
2   trigger: 'hover',
3   type: 'image',
5 });

3. Create a text preview when you click/tap on the element ‘#demo2’

1 $('#demo2').previewer({
2   trigger: 'click',
3   type: 'text',
4   text: 'This is sample text'
5 });

4. Create an html5 video preview when you click/tap on the element ‘#demo3’

1 $('#demo3').previewer({
2   trigger: 'click',
3   type: 'video',
4   src: 'sample.mp4'
5 });

5. Override the default CSS styles of the preview popup.

1 $('#element').previewer({
2   containerCSS: {
3     "border": "1px solid #999",
4     "background-color": "#FFEE88",
5     "border-radius": "5px",
6     "padding": "6px"
7   }
8 });

6. Callback functions.

1 $('#element').previewer({
2   beforeShow: function(){},
3   onShow: function(){}
4 });

This awesome jQuery plugin is developed by jinqiangshou. For more Advanced Usages, please check the demo page or visit the official website.

source : jqueryscript.net