jquery-match-height icon indicating copy to clipboard operation
jquery-match-height copied to clipboard

Can you add a watch for animation events in children elements

Open bitlost opened this issue 10 years ago • 4 comments

I found an interesting issue... Lets say I have two side by side areas Main Area (A) and Sidebar (B). A & B have match height applied to them.

However inside A, is an FAQ list. It simply lists out a number of questions, but the answers are set to display:none in css.

When the user clicks on a question, the answer calls jquery slideDown(). This changes the height of the content in A. But since A had the height explicitly set, it doesn't change.

Can you simply add another watch for any of the child elements completing an animation, and resize again?

Something to the effect of...

$(":animated").promise().done(function() { matchHeight._update(true, event); });

bitlost avatar Mar 28 '15 20:03 bitlost

+1

serifofnottingham avatar Apr 09 '15 18:04 serifofnottingham

+1 We have a hidden child div that appears on hover that is taller than the parent container. It would rock if we could set the height of the child div that is hidden by display: none

mikezielonka avatar Apr 09 '15 18:04 mikezielonka

@bitlost Can anyone provide some jsfiddle examples of your use case? @mikezielonka Hidden children should already be supported by the plugin, is that not working?

liabru avatar Apr 14 '15 22:04 liabru

I'll leave this up for a while if someone wants to take a look - https://goo.gl/IFL6hc

The main content area and sidebar are using matchheight. If you click on the form send button without filling any fields, a hidden message will appear and slide over the footer text.

I might just try and disable matchheight for certain screen widths as I only need it when the sidebar becomes absolutely positioned, but it should show the issue.

robwent avatar Dec 09 '16 00:12 robwent