Git Product home page Git Product logo

codrops / animatedresponsiveimagegrid Goto Github PK

View Code? Open in Web Editor NEW
323.0 30.0 108.0 1.56 MB

A jQuery plugin for creating a responsive image grid that will switch images using different animations and timings. This can work nicely as a background or decorative element of a website since we can randomize the appearance of new images and their transitions.

CSS 7.84% HTML 64.05% JavaScript 28.11%

animatedresponsiveimagegrid's Introduction

AnimatedResponsiveImageGrid

A jQuery plugin for creating a responsive image grid that will switch images using different animations and timings. This can work nicely as a background or decorative element of a website since we can randomize the appearance of new images and their transitions.

article on Codrops

demo

Licensed under the MIT License

animatedresponsiveimagegrid's People

Contributors

botelho avatar gasp avatar ianlintner-wf avatar jlnslv avatar mbinette91 avatar paulannekov avatar phocks avatar widatama avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

animatedresponsiveimagegrid's Issues

Only show image once

I'm wondering if there is a way to alter the script that the initial images that are shown before the rotation begins are NEVER re-used. Basically, I want to show the grid as a single cohesive image of tiles that makes up a picture, then have those images rotate to other images, but not using the originals again. Any ideas?

Rotate the images in a random order.

Hi,

Thanks for the great plugin.

Is it possible to rotate the images in a random order (instead of in order currently), but also making sure 2 of the same images are never pulled at the same time?

Could you point me the code where i can make changes to achieve that? I just need to know how to edit the existing code to pull the images randomly.

Thanks,

onhover hook?

Is there a way to add an onhover hook?
For example, I want to overlay some text on an image on a onhover - instead of an animation.

Blanks Showing

Whilst implementing this, my version was showing blanks.
When embedding the example, the issue didn't occur.
To eliminate the options being an issue, I tried using the initiation code for the example on my version and vice versa.
It was still my version that had the issue, so it must be the HTML markup.
Increasing the number of images seemed to help, but duplicating the markup, meant duplicates displayed at the same time.

My workaround is as follows...

window.setInterval(function(){
checkMissingImage();
}, 100);

function checkMissingImage() {
"use strict";
jQuery( "#ri-grid ul li a" ).each(function() {
if (jQuery(this).css('background-image') == "none" ) {
jQuery(this).css('background-image', 'url(img/reserve.png)');
}
});
}

It's probably not very efficient, but hopefully someone might find this useful or provide a better solution.
I've excluded the reserve image from the HTML markup to avoid duplicates.

Resize don't work correct on IOS

When turning a iPad from landscape to portrait (or vise vera) the grid don't get resized.
It looks like there is nobody listening to the correct event.
Any hint of how to fix this?

changing cursor

this shouldn't be hard coded, let user define his cursor (line 312) :

this.$items.children().css( 'cursor', 'default' ).on( 'click.gridrotator', false );

Multiple instances

How can I use 3 different grids on the same page (multiple instances of #ri-grid1 #ri-grid2 #ri-grid3)

[enhancement] Add missing bower.json.

Hey, maintainer(s) of codrops/AnimatedResponsiveImageGrid!

We at VersionEye are working hard to keep up the quality of the bower's registry.

We just finished our initial analysis of the quality of the Bower.io registry:

7530 - registered packages, 224 of them doesnt exists anymore;

We analysed 7306 existing packages and 1070 of them don't have bower.json on the master branch ( that's where a Bower client pulls a data ).

Sadly, your library codrops/AnimatedResponsiveImageGrid is one of them.

Can you spare 15 minutes to help us to make Bower better?

Just add a new file bower.json and change attributes.

{
  "name": "codrops/AnimatedResponsiveImageGrid",
  "version": "1.0.0",
  "main": "path/to/main.css",
  "description": "please add it",
  "license": "Eclipse",
  "ignore": [
    ".jshintrc",
    "**/*.txt"
  ],
  "dependencies": {
    "<dependency_name>": "<semantic_version>",
    "<dependency_name>": "<Local_folder>",
    "<dependency_name>": "<package>"
  },
  "devDependencies": {
    "<test-framework-name>": "<version>"
  }
}

Read more about bower.json on the official spefication and nodejs semver library has great examples of proper versioning.

NB! Please validate your bower.json with jsonlint before commiting your updates.

Thank you!

Timo,
twitter: @versioneye
email: [email protected]
VersionEye - no more legacy software!

animation on mouseleave

"onhover:true" does not make sense if we use , instead the animation should happen when user exits the grid.

Again (line 364) shouldn't hardcode the 'mouseenter' event.

as a workaround use :
self.$items.on( 'mouseleave.gridrotator', function() {

Importance of Correctly Setting Width, Rows, Columns

Hi,

I had to spend a lot of time to make it work. In the end I learned this:

1:
In the javascript file, there was this set of options like:
w1024 : { rows : 3, columns : 8 },

For a screen resolution greater than 1024, unless I have number of images that can fill 3 rows completely, the script won't be shuffling the images.

I changed it to:
w1024 : { rows : 1, columns : 6 },

2:
Columns above is set to 6. If I add 6 or less images, it won't shuffle images. At least
one extra image needs to be added for it to work.

Am I right?

Images constantly being requested from the server

We love the grid rotator but are having some issues with images being constantly requested over and over each time they are rotated in.

I'm not seeing similar behavior in the demos so I must be doing something wrong.

You can see working version of what we're struggling with at https://dev.nodeping.com/index4

Any help you can offer would be greatly appreciated.

Thanks.

Error line 60

change
p = Math.floor(Math.random()*this.length);
to
p = Math.floor(Math.random()*a.length);

Thank's

Is there a way to dynamically add images ?

I'm trying to add more images in runtime. I have tried to replace the image src attributes at runtime, but it doesn't replace it. It seems that it's actually cloning the object. Only way I was able to do is to add new 'li' element and call .gridrotator() again, but the transition is not smooth.

Any suggestion ?

Row and Column Settings Being Ignored

Hi, could you please please let me know how to adjust the rows and columns. All my changes to the rows and columns settings seem to get ignored no matter what i do.
I added w1920 : { rows: 6, columns: 8 } but I'm stuck with 4 rows and 8 columns and a blank space.
Thanks for the plugin. I really feel bad asking for more, but i've been cracking my head and can't find a solution

nochange property

Get project, thank you. I made a Drupal 8 module that makes a page with it and it works great.

The nochange property does not seem to work for me though. How should it be formatted and in what tag should the id go to - li, a, or img?

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.