Giter Site home page Giter Site logo

gridloadingeffects's Introduction

gridloadingeffects's People

Contributors

botelho avatar crnacura avatar transient-jonas 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

gridloadingeffects's Issues

How to hide images before layout

How do you hide the images before Masonry organizes them into a grid? My shows the images in a pile as they are being loaded and then finally once they are all loaded then Masonry organizes them nicely.

[enhancement] Add missing bower.json.

Hey, maintainer(s) of codrops/GridLoadingEffects!

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/GridLoadingEffects 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/GridLoadingEffects",
  "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!

IE

Is there a way to have a fallback for IE (7-8)? I don't care about transitions, but is there a possibility to have the grid pattern?

Errors:

SCRIPT5014: Array.prototype.slice: 'this' is not a JavaScript object
AnimOnScroll.js, line 89 character 4

SCRIPT438: Object doesn't support property or method 'addEventListener'
demoad.js, line 13 character 1

rtl dir

how set right to left direction??

Removing event listener passing the wrong function reference

Hi all, thanks for this amazing demo and for making it open source!

I'm using the code on my website and I notice that the _onScrollFn was being executed even after all the "items" were already animated...

Looking at the code, I notice something wrong on this line

As you can see, the code isn't removing the listener...
this is because the function passed on addEventListener is an anonymous function,
see here
if you want to remove this listener, you have to pass the right reference of the function that was passed on addEventListener.

There are some ways to resolve this.
You just have to store the function's reference that was passed on addEventListener and then pass this reference on this line

I fixed it like this:

First I've declared the _onScrollFn like this, outside the scope of AnimOnScroll class

function onScrollHandler() {
    var self = this;
    if( !this.didScroll ) {
        this.didScroll = true;
        setTimeout( function() { self._scrollPage(); }, 60 ); 
    }
}

Then, on the constructor function, I'm creating a bound function and adding it to the instance, so when called, has its this keyword set to the provided value ( the object instance )

this._onScrollFn = onScrollHandler.bind( this );

So, when calling both addEventListener and removeEventListener, we pass this._onScrollFn.

window.addEventListener( 'scroll', self._onScrollFn, false );
_checkTotalRendered : function() {
    ++this.itemsRenderedCount;
    if( this.itemsRenderedCount === this.itemsCount ) {
        window.removeEventListener( 'scroll', this._onScrollFn );
    }
}

The Function.prototype.bind() isn't supported on versions < IE9,
there is a polyfill, though.

I can create a PR with this fix
if you guys think it's ok...

Thank you again

Destroy, reload

Hi codrops,

I'm implementing this on a new website and I'm trying to add a filter system to the masonry, but I'm not able to run any of the masonry options, since it's being recreated on AnimeOnScroll.

Any idea on how I can reload the grid, after hiding the filtered cards?

What I was trying to do, but is currently failing:

$li.removeClass('active'); $('#grid').find('.item-'+targetLink).addClass('hidden'); $('#grid').masonry('layout');

Thank you :)

load more button

is it possible to use a manual "load more" button instead of default infinite scrolling ?
Thanks !

Can I use it without Masonry?

Greetings!

Thank You much for Your work!
Can I use it in vanilla css/js? (not an issue but question, please close if needed)

Best regards, Gennady

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.