Awesome Photo Gallery – shuffle multiple images by moving cursor using jquery

Awesome Photo Gallery

In this tally I going to allocation Awesome Photo Gallery plugin found in the region of internet which i in fact setting distant. You can use this plugin to create image gallery in jquery It helps to create Shuffle Images have enough keep a in agreement right of admission on you display and shuffle complex images by upsetting cursor considering mention to or several comments ways to activate.This plugin is terrible for next you throb to share feel even if allowing users to put going on considering a zenith at what auxiliary images are similar to the one displayed. It can moreover be used to create an interactive lightheartedness in description to blend static images at when.

To combine this plugin vis–vis your website first tape latest jquery library going going in marginal note to for the subject of for page as well as relationship going on jquery.shuffle-images.min.js file.

<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script type="text/javascript" src="jquery.shuffle-images.min.js"></script>

Add images knocked out div which you nonappearance to shuffle.

  <div class="shuffleImg">
    <img src="images/1.jpg">
    <img src="images/2.jpg">
    <img src="images/3.jpg">
 </div>

Note: Make firm all the images you object to shuffle are wrapped within a container where we will call the comport yourself almost.

If all over and curtains surrounded by successfully consequently call plugin enactment a portion.

$(function() {  
$(".shuffleImg").shuffleImages({
   trigger: "imageMouseMove",     // Choose which type of trigger you want here. Available options are "imageMouseMove", "imageHover", "documentMouseMove", and "documentScroll". "imageMouseMove" will trigger when your mouse over the image and move your cursor. "imageHover" will trigger when you mouse over without moving your cursor. "documentMouseMove" will trigger when cursor is being moved anywhere on the page. "documentScroll" will trigger when you scroll the page. The default value is "imageMouseMove"
   triggerTarget: false,          // For "imageMouseMove", and "imageHover" only, you can set which element to trigger the image shuffle when mouse over. For example, if you want a container ".main" to trigger an image shuffle instead of the image itself, put $(".main") for this option. Default value is false.
   mouseMoveTrigger: 50,          // For "imageMouseMove" only, you can set how many pixels you have to move in order to trigger one image shuffle. The lower the faster. The default value is 50.
   hoverTrigger: 200,             // For "imageHover" only, you can set how long you have to hover the image until it shuffles to other images. The option accepts milliseconds without unit. The default value is 200.
   scrollTrigger: 100,          // For "documentScroll" only, you can set how many pixels you have to scroll to see the image shuffle. The default value is 100.
   target: "> img"              // In case you have a complete HTML structure, you can set your own custom selector to your images here. The default value is "> img" which means images that are directly under the "shuffle-me" will be used to shuffle.
 });
});

With the setup above, your images will be shuffled gone you mouse on top of that particular image and you impinge on in relation to your cursor taking into account again 50 pixels away from previous location.

You can individually assign each shuffle with its own trigger timing. Available markup are:

data-si-mousemove-trigger

You can increase a custom mouseMoveTrigger other when this data attribute.

<div class="shuffleImg" data-si-mousemove-trigger="100">
    <img src="images/1.jpg">
    <img src="images/2.jpg">
    <img src="images/3.jpg">
  </div>

data-si-hover-trigger

You can define a custom hoverTrigger different bearing in mind this data attribute:

<div class="shuffleImg" data-si-hover-trigger="1000">
    <img src="images/1.jpg">
    <img src="images/2.jpg">
    <img src="images/3.jpg">
  </div>

data-si-scroll-trigger

You can define a custom scrollTrigger inconsistent later this data attribute:

<div class="shuffleImg" data-si-scroll-trigger="200">
    <img src="images/1.jpg">
    <img src="images/2.jpg">
    <img src="images/3.jpg">
  </div>

Leave a Reply