Jquery. gridrotator implements responsive Image Display gallery effect _ jquery

Source: Internet
Author: User
Tags image flip
This tutorial will show you how to create a jQuery responsive image to show the gallery effect. All the images are arranged in the form of a grid, and some of the grids are flipped at random to switch between images. This effect can be used as a background or decoration on our website. Jquery. gridrotator is a very practical responsive Image Display gallery plug-in. This image display gallery plug-in arranges images in the same way as a grid, and then randomly flip the images in a grid to display another image. There are 6 effects in total.

HTML structure:

The HTML structure is very simple.

Call plug-ins

$(function() {       $( '#ri-grid' ).gridrotator();});

Do not forget to introduce the jQuery and jquery. gridrotator. js files.
Optional Parameter

// number of rowsrows      : 4, // number of columns columns     : 10, // rows/columns for different screen widths// i.e. w768 is for screens smaller than 768 pixelsw1024      : {  rows  : 3,  columns : 8}, w768      : {  rows  : 3,  columns : 7}, w480      : {  rows  : 3,  columns : 5}, w320      : {  rows  : 2,  columns : 4}, w240      : {  rows  : 2,  columns : 3}, // step: number of items that are replaced at the same time// random || [some number]// note: for performance issues, the number should not be > options.maxStepstep      : 'random',maxStep     : 3, // prevent user to click the itemspreventClick  : true, // animation type// showHide || fadeInOut || slideLeft || // slideRight || slideTop || slideBottom || // rotateLeft || rotateRight || rotateTop || // rotateBottom || scale || rotate3d || // rotateLeftScale || rotateRightScale || // rotateTopScale || rotateBottomScale || randomanimType    : 'random', // animation speedanimSpeed    : 500, // animation easingsanimEasingOut  : 'linear',animEasingIn  : 'linear', // the item(s) will be replaced every 3 seconds// note: for performance issues, the time "can't" be < 300 msinterval    : 3000,// if false the animations will not start// use false if onhover is true for exampleslideshow    : true,// if true the items will switch when hoveredonhover   : false,// ids of elements that shouldn't changenochange    : []

When you define the grid size, you should note that all images will be immediately displayed in the grid. For example, if you have 50 images and define four rows and five columns, 20 images will be displayed in the grid, and 30 others will be used for image flip switching.

The above is all the content of this article. I hope you will like it.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.