Coder Social home page Coder Social logo

jquery-equal-heights's Introduction

jquery-equal-heights's People

Contributors

bryanp avatar jangosteve avatar jefflembeck avatar johnbender avatar zachleat 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

jquery-equal-heights's Issues

Run after AJAX content is loaded

I'm trying to get this to work alongside using your awesome Ajax-Include-Pattern, but can't get it to calculate the correct height. I'm guessing that it is failing because the Equal Height code can't see the AJAX inserted code. How would I go about getting this to run once the AJAX has inserted the correct content?

$(document).ready(function() {

    // Prevent world from ending on any href="#" a tags
    $('a[href="#"]').click(function(event) {
        event.preventDefault();
    });
    $("[data-append],[data-replace],[data-after],[data-before]").ajaxInclude();
    $('.mega-menu').equalHeights(false);
});

Optimize via Caching

I found an extracted version of your equalHeights function on a recent project while doing a performance audit. When viewing the site's waterfall table via webpagetest.org, IE8's slow js engine showed a blocking gap [1] of 4.1 seconds (it was a js-intesive site) . Once the function was removed, the gap went down to 1.3 seconds. A MAJOR improvement.

The largest contributing factor turned out to be the multiple height() queries. We had 13 top-level menu items that each had a dropdown containing 1-5 columns of list items, totaling 60 columns in all. That meant the DOM had to be recalculated 120 times. Fortunately, we were able to substitute the function with a css fix. Barring a css fix, at least caching the height() query (among other things) would have cut the performance hit significantly.

My optimized suggestion: https://gist.github.com/1660062

[1]: A gap where all assets are blocked from downloading while javascript is executed.

seems to work only for a single instances?

I want to have two container with its child set to equal height. Seems only the first one works. If i take off the first one, the 2nd works.

Cant have multiple i guess.

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.