Giter Site home page Giter Site logo

Comments (6)

liabru avatar liabru commented on May 18, 2024

It looks like the reason is that the row detection isn't working correctly when the elements are hidden.

E.g. if the menu is visible before you apply:

$('.dropdown-menu').css('display', 'block');
$(".yamm .thumbnail").matchHeight();

It seems to work.
So there does seem to be a problem with the code for handling hidden elements.

I'll look at fixing this, before then you have two options:

  • update matchHeight on the "browse" button click event, just before the menu shows (use the _update method)
  • apply matchHeight before hiding the menu on page load

Hope that helps.

from jquery-match-height.

rtpHarry avatar rtpHarry commented on May 18, 2024

Thanks for the feedback. Just wanted to check in and say based on your advice I did get it working satisfactorily. Because this was being used inside a Bootstrap 3 navbar I hooked into the opening event and updated it like this:

    $('.yamm .dropdown').on("show.bs.dropdown", function() {    
        $.fn.matchHeight._update();     
    })

from jquery-match-height.

liabru avatar liabru commented on May 18, 2024

Great!

I've got a fix for this nearly ready to go, so when I get time I'll push it and update this thread.

from jquery-match-height.

liabru avatar liabru commented on May 18, 2024

I've just pushed a fix for this in the latest master version.

If you have time it would be cool if you could try it (disable your previous fix temporarily first).

from jquery-match-height.

rtpHarry avatar rtpHarry commented on May 18, 2024

Hey I tried out your new build and it has resolved the issue that I was seeing. Good work!

http://jsfiddle.net/rtpHarry/6mudcbuc/14/embedded/result/

(notice the _update() is disabled now on line 26 of the js)

from jquery-match-height.

liabru avatar liabru commented on May 18, 2024

Great, thanks for logging this!

from jquery-match-height.

Related Issues (20)

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.