Direction aware Gallery Hover Effect jQuery SnakeGallery - Download Direction-aware Gallery Hover Effect With jQuery - SnakeGallery

Download Direction-aware Gallery Hover Effect With jQuery – SnakeGallery

Posted on

This time I will share jQuery Plugin and tutorial about Direction-aware Gallery Hover Effect With jQuery – SnakeGallery, hope it will help you in programming stack.

Direction aware Gallery Hover Effect jQuery SnakeGallery - Download Direction-aware Gallery Hover Effect With jQuery - SnakeGallery
File Size: 3.49 KB
Views Total: 7024
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

SnakeGallery is a very small jQuery plugin for creating an animated hover overlay for your gallery that slides out from the boundary depending on the direction you enter the image.

How to use it:

1. Load both jQuery library and the jQuery SnakeGallery plugin’s script at the end of the html document:

1 <script src="//code.jquery.com/jquery-3.1.1.min.js"></script>
2 <script src="snake.min.js">

2. Add captions to your gallery images as this:

01 <div class="snake">
02   <div class="overlay">
03     <span class="title">Image Title</span>
04     <span class="description">Image Description</span>
05   </div>
06   <img class="" src="1.jpg">
07 </div>
08  
09 <div class="snake">
10   <div class="overlay">
11     <span class="title">Image Title</span>
12     <span class="description">Image Description</span>
13   </div>
14   <img class="" src="2.jpg">
15 </div>
16  
17 <div class="snake">
18   <div class="overlay">
19     <span class="title">Image Title</span>
20     <span class="description">Image Description</span>
21   </div>
22   <img class="" src="3.jpg">
23 </div>

3. Initialize the plugin with default options.

1 $(".snake").snakeify();

4. Set the animation speed in milliseconds.

1 $(".snake").snakeify({
2   speed: 200
3 });

5. Style the hover overlay in the CSS.

01 .overlay{
02   position: absolute;
03   opacity: 0.9;
04   text-align: center;
05   padding-top: 60px;
06   background-color: #ffffff;
07 }
08  
09 .overlay .title{
10   font-size: 15px;
11   font-weight: bold;
12   display: block;
13   width: 100%;
14 }

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

source : jqueryscript.net