This problem is not related to wordpress but with how javascript behave.
You need to wait until ajax call is completed then relayout. You can confirm it by putting “console.log()” in your javascript.
Related Posts:
- How can I make an Ajax login form work with FORCE_SSL_ADMIN enabled?
- Help making my pagination plugin better
- admin-ajax returning 400 error when request is made with Fetch API
- How can I pass a variable to wp_ajax action?
- How to pass JavaScript variable to PHP in wordpress widget?
- Add image to post from external URL
- jQuery AJAX call not executing in Plugin
- Problem running Ajax in WordPress
- Errors while using ajax from external wordpress page
- I can’t access wordpress functions from an ajax php call
- Built in admin ajax hooks?
- delete_user_meta Delete one value out of array
- How to use wp-ajax in wp-cron
- Calling shortcode in wp_localize_script strips result
- how to use ajax to display from database and load more in wordpress plugin
- Ajax with jQuery UI dialog not working
- Shortcode in AJAX popup
- AJAX image upload with a upload progress bar using media_handle_upload
- jQuery Plugin to use WordPress functions in AJAX request
- $wpdb working with ajax but showing ajax error instead of success
- Why none of the plugins that have ajax doesn’t work in my website?
- Why do plugins that cause ‘unexpected output’ create AJAX problems?
- AJAX button run function
- How to put JQuery/Ajax inside shortcode?
- WordPress Ajax Posting from App
- Using a custom plugin to capture input data via Ajax and PHP
- Ajax contact form widget plugin data not insert in database
- woocommerce_package_rates not fired when wordpress woocommerce accessed as non ajax
- Why WordPress plugin url ajax doesn’t work?
- AJAX in plugin wp_send_json() sending html
- Making sure that a plugin’s scripts and stylesheets are included for dynamicaly loaded content
- Ajax call returning 0
- Ajax fail and get 504 error
- Ajax Search Lite: Customize Autoscroll
- admin-ajax.php warning max input vars exceeded on layered pop plugins [closed]
- Create tabs in admin options page from custom post type loop
- wordpress file upload with ajax when site is ajaxyfi
- AJAX search as you type? [duplicate]
- WordPress api call using wp-ajax returns error 400
- how to insert data in wordpress table usnig jquery ajax
- Using wpdb without loading all plug-ins via wp-load.php
- Admin AJAX doesn’t work in plugin admin page – Even though code is copied verbatim from WordPress Codex
- Call plugin with php function
- AJAX on Front-End Button Click not working – Custom Plugin
- How to handle WordPress Plugin Front-end AJAX Call [duplicate]
- AJAX Load more start with x posts
- Is it safe to use admin-ajax.php in the frontend?
- Create WordPress posts from JSON array using plugin in admin
- Adding inside wp-plugin jQuery script that receives JSON-formatted data, generated by php-function inside this plugin
- WordPress front end AJAX. Return 0 :?
- How to do the simplest possible frontend ajax call from a plugin?
- Proper way to handle admin-ajax calls
- Using custom php file for ajax url inside plugin
- Asynchronous request in wordpress
- How do I localize admin-ajax.php that is used in Ajax Load More – Infinite Scroll?
- Ajax object not defined – JS file is in plugin folder
- How to get CPT category checkbox list and show post of selected(multiply) checkboxes via ajax?
- WordPress subfolder installation AJAX Problem
- Call Ajax URL in Plugin
- Calling a class method instantiated by ajax call in wordpress [closed]
- Loading by Ajax a plugin that also uses Ajax
- How to call php file in theme directory from plugin
- How can I adjust my function so the page editor still loads in the backend?
- Error datatable whit ajax
- Facing Problem with admin-ajax.php URL – Getting 404 with AJAX call
- Trouble with AJAX using GET
- WP Ajax DB issues
- Calling PHP function with AJAX
- Adding LOAD MORE on a page
- jQuery Ajax not loading page with ACF fields
- How achive serving multiple concurrent Ajax / Rest calls in plugin?
- admin-ajax.php returning 0
- Update User Meta Via Ajax
- User Following System
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- Overwriting Plugin’s Ajax callback function from theme
- cURL do not mimic click
- admin-ajax.php not working properly on subdomains
- My ajax request don´t work and return 0
- Plugin with AJAX on subdomains causes 404 in console
- WordPress update plugin through Dashboard/Plugins displaying error
- How can I use wp_ajax_response for front-end error reporting?
- Not getting result using ajax on wordpress
- display user input using ajax in wordpress
- Ajax, jQuery and WordPress
- Hyperlink to execute PHP
- How to get site homepage from plugin?
- Contact Form loaded with Ajax
- How to load a plugin when doing an Ajax call? [duplicate]
- WordPress plugin ajax post parameter
- admin panel save option with ajax
- Capturing POST data
- Pulling Advanced Custom Fields from other pages
- Response from Php File to Ajax is not getting sent
- Plugin Admin Page Ajax-Admin call returning 0, URL set correctly. Implemented localized scripts but did not fix it
- Load css classes after using ajax calls
- How do I call an action hook into wp_ajax hook callback function
- Select posts from list and add them in a new list
- Ajax response from Media Selection does not update ALL information more than once
- Simple ajax request with Vanilla JS keeps given 400 Bad Request