I think, if you change your jQuery click action selector to handle event delegation the follow buttons should work after being added by ajax.
// Change this
$( '.follow-links a' ).on('click', function(e) {
// to this
$( '.some-parent-not-added-by-ajax' ).on('click', '.follow-links a', function(e) {
// or as last resort
$( document ).on('click', '.follow-links a', function(e) {
Related Posts:
- How can I fetch loop of post titles via AJAX?
- Adding “Remember Me” in custom login
- Retrieve POST data from AJAX call
- The correct method to pass query vars in AJAX using ajaxurl
- Using wp_send_json to return HTML
- Is having multiple theme customizers for different pages possible?
- WordPress Ajax always returns a 404 error
- Redirect to Page after Post Submit
- problem with ajax and the path to the php page
- simple wordpress ajax plugin not working when not logged in
- AJAX / Read More: multiple check_ajax_referer() and wp_create_nonce() not working independentely
- Audio Player not loading when the content is loaded through Ajax, MediaElement.js no applied
- Targeting single page with JS
- Handling an Ajax form submit
- Ajax call to my WordPress website from an external application [duplicate]
- Constructing a custom login form using ajax
- Custom WordPress+PHP+MYSQL+AJAX form, submit event not captured by Javascript, but does POST data to the DB
- Click loads template via ajax
- How to retrieve the content (with a specific ID) via ajax by clicking a link tag
- WooCommerce: update custom fields after checkout validation failure
- How to speed up admin-ajax.php in wordpress
- Put CSS inside a PHP file and include it the right way
- Sending jsPDF documents to the server
- How to Fetch values from WP database based on selected option value by onchange using PHP?
- wp_insert_post() is returning the correct post ID, no failure, but the post content does not get updated
- Why is the post meta[] empty when I make a call to the wordpress rest api?
- Checking for new message using AJAX and PHP. Server overload?
- Ajax not working es expected (Returns 0)
- Load a page into a div with Ajax
- Ajax category filtering products default show all
- Status 400 for AJAX POST Request with admin-ajax.php
- Why ajax doesn’t work on certain wordpress hooks?
- AJAX pagination, update current page
- adjust section according to country?
- Change “add to cart” button color based on Woocommerce product category [closed]
- Ajax request returns ‘Array’. How to output the actual results?
- Ajax call return 404
- Show success or error messages in Ajax response to WordPress custom registration form
- How to add a Custom Mailchimp AJAX Newsletter Subscribe Form
- Fancybox type popup window that’s not an iframe
- Using Select HTML in Bootstrap Popovers
- Can I use a jQuery Ajax request in Code Snippets Plugin for WordPress?
- How do I Import / Upload Files with jQuery AJAX?
- WordPress plugin: render only page content using ajax call
- HTML escaping data with ajax requests
- Function won’t run onclick using Ajax
- WordPress plugin admin page – using WordPress function in linked php file
- Use value from Ajax call in PHP function
- Any ideas why I am getting “I’m getting “wp-admin/admin-ajax.php 401 (Unauthorized)”
- A $_POST should occur when submit form but is not?
- WP_Query with AJAX returning empty array
- Loading Posts & Category with Ajax
- How to get post category list as select in front-end?
- PHP Warning: Missing argument 2
- Is there a hack for using is_page() within the function.php file?
- How to SELECT number from table and use in calculation . Unsupported operand types
- Submit form to db
- Change Query Arguments (filter) with jQuery/Ajax or PHP?
- Can not call .php files after switching to %postname%
- WordPress Conditional / Multiple Taxonomy Query
- Using Ajax to submit a form, and run a SQL Select query based on user input from the form
- AJAX function running TWICE with WordPress admin-ajax.php
- Tracking Visitor LatLng with WordPress using JS, PHP. How to put data which was extract using JS into DB
- WordPress Search Ajax + Isotope + InfiniteScroll
- How do I make these combination select filters work when only one dropdown is set? They work in WordPress 5.8.2 but don’t in 5.8.3
- duplicate posts with ajax load more wordpress
- Failed to load resource: the server responded with a status of 500 (Internal Server Error) through wp_admin_ajax.php
- Change ajax live search results
- How to call my PHP function with AJAX ? wp_query
- Can’t pass var from php wp_ajax into ajax script : result undefined or null
- Ajax filter with loadmore button
- Admin-ajax.php 404 error
- How to pass values from one function to the other using an array variable
- get_the_author_meta( ‘ID’ ) just return 1
- Update $wpdb query with AJAX
- custom mailchimp form using HTTP API
- WordPress is setting from header wrongly in wp_mail
- AJAX to add to cart multiple products woocommerce
- WordPress ajax filter returning all posts when it should be filtering by category
- ajaxurl usage for a custom function
- How can i get the same ajax result using WP REST API instead of admin-ajax?
- Prepared DB Query from _POST array
- Pass form attributes to another php template in wordpress
- Custom HTML form using PHP – help with ajax/username validation
- AJAX Returning Way Too Many Posts
- WordPress AJAX load post metadata in modal
- wordpress ajax return 0
- Ajax call URL 404’ing when pushed to staging server
- Modify category archive page loop on functions.php
- Run insert if no entry otherwise run update with ajax
- Adding instant search to wordpress page
- AJAX & PHP | Call a specific PHP function from a PHP file via AJAX?
- Load php function with AJAX on modal window
- Cookie not created in AJAX request
- notify users when changed database
- WordPress Query -> Ajax Query
- how to display tables via ajax
- getJSON response to PHP
- How to make this shortcode not refresh the whole page when i use it on frontend
- Woocommerce – how can i add items to cart using onclick – multiple items at once with custom prices