-
Notifications
You must be signed in to change notification settings - Fork 801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
matchHeight after Ajax call #132
Comments
you,ve to write the ajax content first in a hidden div and per JS you can write it anywhere in the document. Then match height update should work, |
Hi David, thanks for your prompt reply :-) as the ajax content is being written in by a third-party script, I am not sure how much control we have over how/where it gets called in - I will certainly have a look, though - thanks again! |
Are you saying that even though A quick common trick is to use a timeout with a small value or even 0 and then updating matchHeight, or if you're on the bleeding edge maybe look at MutationObserver. |
Hi Liam, thanks for your response :-) Unfortunately due to time constraints we've had to abandon the ajax plugin for the moment. I might try tackle it again if there is time at the end of the project, so thanks for your suggestions! |
Sure, thanks for the update. |
Have ou found solution? I have same problem matchHeight not working after ajax layered navigation usage (need to refresh age after that) |
@rantsboy : You can try using ajaxSuccess - https://api.jquery.com/ajaxSuccess/. It worked for me.
|
Hi,
I am a little new to jQuery, so apologies if this doesn't make sense!
We are using an Ajax Layered Nav plugin to dynamically filter products in a WooCommerce project. Initially the shop items have matchHeight applied to them (works like a charm!), but after the Ajax call (no matter what we've tried!), we just can "access" the new content to re-apply the heights function.
Currently we have been able to "hook into" the ajax function, and get things to happen (outside of the newly generated content) once it's done, but nothing we've tried has any effect on the new content.
The code we're using (in our custom theme .js) is as follows:
Any help/advice/suggestions would be MUCH appreciated - thank you!
The text was updated successfully, but these errors were encountered: