Height issues with ajax
See original GitHub issueHi,
I’m using matchHeight()
on a WordPress site, and its working fine on initial render. But I’m using Ajax Load More to load more posts, using jQuery’s ajaxComplete()
to update the height on loaded posts. It’s working fine on the first load, but on the second load the heights are set to high (should be around 300px, gets set to around 500px).
Here is my JS:
jQuery.noConflict();
jQuery(document).ready(function($){
$(function() {
$('#employees .person').matchHeight();
});
$( document ).ajaxComplete(function() {
$.fn.matchHeight._apply('#employees .person')
$.fn.matchHeight._maintainScroll = true;
});
});
And ideas?
Issue Analytics
- State:
- Created 9 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
JQuery Accordion Ajax Height issue - Stack Overflow
I know it is caused by the ajax and dynamically adding the accordion because if I add my own headings and divs inside...
Read more >Page height issue in AJAX framework after switching to ...
iView added, the height of the page appears to default to Height Type of Fixed and Fixed Height of 80. We have changed...
Read more >Height Issue With UseStaticHeaders in UI for ASP.NET AJAX
Hello Jon, When the height of a div element is set with percentage, the height will be calculated based on the parent element...
Read more >Cleverly set height and proportions of a responsive HTML ...
Setting an explicit height of a container within responsive layouts is less common and may lead to errors when loading the AJAX-ZOOM viewer ......
Read more >Row height causes problem on ajax and showing row with ...
The impact is that the "Showing" bloc show "Showing 1 to 20 of 21,254 entries (filtered from 455 total entries)" when only 10...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Alas, no – that didn’t help.
After much trying, the best I’ve been able to come up with is this:
ALM uses a slide (or fade) effect that takes 300 ms. If I don’t put in the delay, the heights are set way to high. And the page «jumps» when heights are set, no matter if I have the delay or not.
I think you’re maybe better doing something more like:
Does that help?