Git Product home page Git Product logo

jquery.equalheights's Introduction

Matt Banks personal site

My personal site, running on Gatsby.

Netlify Status

Setup

  1. Clone this repo
  2. Run npm run develop
  3. Go to town!

Build

  1. Run npm run build

Deploy

This repo is setup to auto deploy to Netlify

jquery.equalheights's People

Contributors

betweenbrain avatar korri avatar mattbanks avatar pafnuty 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

jquery.equalheights's Issues

Set based on parent

Love this plugin, been using it for awhile.

One thing I thought was cool is to invoke like this:

$(".equal").parent().each ->
  $(this).find(".equal").equalHeights()

This works. Do you think it makes sense to build it into the plugin somehow? It seems like most situations ask for a group of children; on my page, I had two different sets of divs I wanted to be equal in height.

Waiting for images to load before applying auto initialize

Hi Matt

I experienced the following issue with the plugin auto initialize feature:

  • When the page was first loaded it will work as expected.
  • When the page was refreshed using Ctrl-F5, resize won't work properly. I found out later it was because some images were been reloaded.

Base on this recommendation (http://stackoverflow.com/questions/544993/official-way-to-ask-jquery-wait-for-all-images-to-load-before-executing-somethin) I wrapped the auto initialization code into a window.load function, like this:

$(window).load(function() {
    // auto-initialize plugin
    $('[data-equal]').each(function() {
        var $this = $(this),
            target = $this.data('equal');
        $this.find(target).equalHeights();
    });
});

... and now everything works now as expected.

Version 1.5.3 doesn't work

After update to new version no heights are set.
In Firebug there is no manipulation to the elements.
Downgrade via bower to version 1.5.2 solved it and it worked.

Browser: FF42

License

Nice plugin, I'd love to use it!
No license is given (as far as I can see), could you please specify some specific license for it?

innerHeigth() <> heigth()

hi. i try to use plugin
but i have some problem - selected objectsjQuery('.pg-csv-box').equalHeights();have real max height 291px but plugin returns 316px because objects with margin and padding.

when i modied plugin to show height and innerheight:

console.log(height);
console.log('height'+$(this).height());

it was returned:

316
height291
311
height286
310
height285

then i modified src to var height = $(this).height(); and height at now calculated OK

//sorry for scary english :)

Getting short columns in Chrome

I've tried a large number of jQuery equal heights approaches. In Chrome, all approaches produce short columns. They all work in Firefox though.

Wondering if you've run into this issue with your plugin? The elements I want to be equal height contain images, but the images all have their width and height attributes set. The images aren't necessarily displaying at those width and height attributes due to this being a responsive design.

Firefox:
firefox_equal_height

Chrome:
chrome_equal_height

Responsive issue: Refresh height on window resize

Great stuff, works out of the box. Thanks for that!

Only thing I'd like to see is it also work on fluid / responsive designs. So I guess it would need to reset the height on window resize.

Is this possible? Would be awesome ;)

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.