Download
Demo
- Overview
- Documents
User Rating: 0/5 ( 0 votes)
Your Rating:
Airview is a Javascript plugin which displays single image as Bootstrap Tooltip. It requires Bootstraps Tooltip.js and JQuery.js to work, both of these plugins are provided.
Lightweight as < 3.05kb and really simple to use
-
sex shop
sex shop
sex shop
sex shop
sex shop
seks shop
spanish fly
psikolog
sohbet numara
sohbet hatti
Source: github.com
1. INCLUDE CSS AND JS FILES
<link href="./css/airview.min.css" rel="stylesheet"> <script src="./js/vendor/jquery.min.js"></script> <script src="./js/vendor/tooltip.min.js"></script> <script src="./js/bootstrap-airview.min.js"></script>
2. HTML
<center class="row"> <img src="img/thumbnail/1.jpg" data-content="1.jpg" width="80"> <img src="img/thumbnail/2.jpg" data-content="2.jpg" width="80"> <img src="img/thumbnail/3.jpg" data-content="3.jpg" width="80"> <img src="img/thumbnail/4.jpg" data-content="4.jpg" width="80"> <img src="img/thumbnail/5.jpg" data-content="5.jpg" width="80"> <img src="img/thumbnail/6.jpg" data-content="6.jpg" width="80"> <img src="img/thumbnail/7.jpg" data-content="71" width="80"> <img src="img/thumbnail/8.jpg" data-content="" width="80"> <img src="img/thumbnail/9.jpg" data-content="9.jpg" width="80"> <img src="img/thumbnail/10.jpg" data-content="10.jpg" width="80"> </center>
3. JAVASCRIPT
$("img").airview({ url: './img/', width: 250, container:'body' });
4. OPTIONS
Option | Type | Default | Description |
---|---|---|---|
animation | boolean | true | Apply a CSS fade transition to the Airview |
container | string / false | false | Appends the Airview to a specific element. Example: container: 'body'. This option is particularly useful in that it allows you to position theAirview in the flow of the document near the triggering element - which will prevent the Airviewfrom floating away from the triggering element during a window resize. |
content | string / function | '' | Default content value if data-content attribute isn't present. If a function is given, it will be called with itsthis reference set to the element that the Airviewis attached to. |
delay | number / object | 0 | Delay showing and hiding the Airview (ms) - does not apply to manual trigger type. If a number is supplied, delay is applied to both hide/show. Object structure is: delay: { "show": 500, "hide": 100 } |
error | string | 'Image Not Found' | Error message that will be shown if no title orcontent or data-content option are not found |
html | boolean | false | Insert HTML into the Airview. If false, jQuery's textmethod will be used to insert content into the DOM.Use text if you're worried about XSS attacks. |
placement | string / function | 'right' | How to position the Airview - top / bottom / left / right / auto. When "auto" is specified, it will dynamically reorient the Airview. For example, if placement is "auto left", the Airview will display to the left when possible, otherwise it will display right. When a function is used to determine the placement, it is called with the Airview DOM node as its first argument and the triggering element DOM node as its second. The this context is set to the Airviewinstance. |
template | string | '<div class="airview" role="tooltip"><div class="airview-arrow"></div><div class="airview-inner"><div class="airview-loader"></div><img /></div></div>' | Base HTML to use when creating the Airview. TheAirview's title or data-content will be injected into the src attribute of .airview-inner img..airview-arrow will become the Airview's arrow. The outermost wrapper element should have the.airview class. Note: You can use title ordata-content to set .airview-inner img src attribute, but we recommend data-content |
title | string | function | '' |
trigger | string | 'hover focus' | How Airview is triggered - click / hover / focus / manual. You may pass multiple triggers; separate them with a space. |
url | string / false | false | Sets common url to all the Airview elements / selector. |
viewport | string / object | { selector: 'body', padding: 0 } | Keeps the Airview within the bounds of this element. Example: viewport: '#viewport' or { "selector": "#viewport", "padding": 0 } |
width | integer / string | 'auto' | Sets max-width to .airview-inner img. If set to auto width will be set to 500 |
5. METHODS
.airview('show')
Reveals an elements popover.
$('#element').airview('show')
.airview('hide')
Hides an elements popover.
$('#element').airview('hide')
.airview('toggle')
Toggles an elements popover.
$('#element').airview('toggle')
.airview('destroy')
Hides and destroys an element's popover.
$('#element').airview('destroy')
6. EVENTS
Event Type | Description |
---|---|
show.bs.airview | This event fires immediately when the show instance method is called. |
shown.bs.airview | This event is fired when the Airview has been made visible to the user (will wait for CSS transitions to complete). |
hide.bs.airview | This event is fired immediately when the hide instance method has been called. |
hidden.bs.airview | This event is fired when the Airview has finished being hidden from the user (will wait for CSS transitions to complete). |