Coder Social home page Coder Social logo

stevenvachon / jquery.wrecker Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 4.0 154 KB

wRECkeR: Responsive Equal-Height Columns and Rows

Home Page: www.svachon.com/blog/wrecker-responsive-equal-height-columns-and-rows

CSS 31.37% JavaScript 68.63%
jquery responsive-layout responsive-grid responsive-table grid-layout table

jquery.wrecker's People

Contributors

stevenvachon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

jquery.wrecker's Issues

Website "How to set it up" is wrong

On your website: https://www.svachon.com/blog/wrecker-responsive-equal-height-columns-and-rows/

In the How to set it up section you give this code snippet as an example

$(function(){
    $("#container").wrecker({
        // options
        itemSelector : ".item",
        maxColumns : 4,
        responsiveColumns : {
            // windowMaxWidth : columns
            // windowMaxWidth order and values should match those in your responsive CSS
            {1024 : 3},
            {800  : 2},
            {640  : 1}
        }
    });
});

You are showing to create respnsiveColumns as an opject with curly brackets {} instead of an array with square brackets [].

If someone were to use the above code they would get an invalid property error.

Interaction w/ jquery.lazyload?

Hey this plugin is working great!

One issue, images no longer lazyloading. Any idea what's going on?

(function($) {

  $('.tw-lazyload').lazyload({
    threshold : 200,
    failure_limit : 10,
    skip_invisible : true,
    effect : 'show',
    event : 'scroll'
  });

}(jQuery));
(function($) {

  // if the page has a jquery.wrecker element
  if ( $('#wrecker-container').length ) {

    function initialize_wrecker() {

      $("#wrecker-container").wrecker({

        // options
        itemSelector : ".wrecker-item",
        maxColumns : 3,
        responsiveColumns : [
          {1080 : 3},
          {810  : 2},
          {540  : 1}
        ]

      });

    }

    // if viewport is larger than 540px
    if (matchMedia('only screen and (min-width: 540px)').matches) {

      initialize_wrecker();

    }
    // end if viewport is larger than 540px

    // initialize wrecker on resize end event
    window.addEventListener('resize:end', function(event) {

      // if viewport is larger than 540px
      if (matchMedia('only screen and (min-width: 540px)').matches) {

        initialize_wrecker();

      }
      // end if viewport is larger than 540px

    }, false);
    // end initialize wrecker on resize end event

  }
  // end if the page has a jquery.wrecker element

}(jQuery));

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.