This isn’t specific to WordPress, but I’ll answer it anyway 🙂
Don’t target the form by id, instead target it by its relationship to the button that was clicked. change:
var str = $("#ajaxForms").serialize();
to:
var str = $(this).parent().serialize();
Related Posts:
- WordPress Ajax problem with undefined url
- wp_ajax() question.. not using wp_enqueue_script?
- Getting jQuery AJAX to work in WordPress (getting -1)
- wp_enqueue_script calling jQuery at different times for different browsers?
- Get with jQuery the value of an ACF field
- Passing variable data from external jQuery file to options.php
- Ajax Request with jQuery not happening
- jQuery AJAX add json2 dependency?
- JSON parsing error syntax error unexpected end of input
- Pass request headers in a jQuery AJAX GET call
- jQuery Ajax error handling, show custom exception messages
- How to send multiple data fields via Ajax?
- My javascript is returning this error: $.ajax is not a function
- Jquery Ajax Posting JSON to webservice
- Ajax TypeError: $.POST is not a function
- TypeError: $.ajax(…) is not a function?
- XML Parsing Error: not well-formed in FireFox but good in Chrome
- Ajax Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource
- How to fix the ‘Missing required request header. Must specify one of: origin,x-requested-with’ Ajax Error
- What’s the point of the X-Requested-With header?
- How to get a cross-origin resource sharing (CORS) post request working
- jQuery Form Validation before Ajax submit
- jQuery – Illegal invocation
- jQuery ajax error function
- ajaxurl not defined on front end
- Enqueue core jQuery in the footer?
- How to correctly include jquery-ui effects on wordpress
- How do I make script load after jquery?
- How to manage ajax calls and JSON in wordpress
- ajax stopped working when not logged in?
- Using jQuery to delete data stored in wp_options
- Is there a JavaScript API? How to access public and private data in JS?
- Correct Method to run scripts with dependencies without enqueue?
- Passing boolean values with wp_localize_script
- Concatenate and minify dependencies for enqueued JavaScript files
- tinymce is not defined when not using wp_editor
- Creating Multiple wp_localize_script for Shortcode?
- WordPress AJAX File Upload – FrontEnd
- How to add a ” waiting” icon for an ajax in WP frontend?
- Can’t get a JSON object in response to an Ajax request with wp_ajax
- Make jQuery library load before plugin files
- What is the simplest ajax upload plugin or script to be used with wordpress?
- AJAX nonce with check_ajax_referer()
- How to control what jQuery version to include, with wp_enqueue_script
- Creating Ajax backend for Specialised Page Template? Should admin-ajax.php be used?
- Adding jquery and thickbox to WordPress theme
- WordPress Ajax URL for function in functions.php
- Move WordPress native javascript to bottom of page?
- Best Practices for Seperating jQuery from HTML/PHP
- RequireJS in custom theme. Working Example
- Infinite scroll / lazy loading with NextGen Gallery [closed]
- wp_mail script with jQuery post
- Ajax call does not activate callback function
- AJAX call returns 0
- AJAX function returning -1
- How to get a jQuery script to run on a page?
- call shortcode in javascript
- WP set auth cookie using Ajax is not saved to browser
- Add `datetimepicker` to form
- jQuery and AJAX Not working with Select Form Element
- Deregister WordPress jquery on specific page
- How to pass both action and formdata in wordpress ajax?
- Gravity Forms loading jquery
- jquery & ajax getting data to php in wordpress
- Moving jQuery to the footer without using de-register in WordPress
- AJAX returns response 0
- jQuery AJAX form validation
- Including javascript for a shortcode
- Passing a varible from jQuery to PHP
- Proper way to load a single post via Ajax?
- Asynchronous Javascript Loaders
- Basic WordPress AJAX Call
- Best Way to Include Scripts on a Specific Template Page
- Trying to get single posts to load on the front page via ajax
- Localize variable for multiple Shortcodes
- ajax call in wordpress front end
- AJAX post into pop-up div
- How to include jquery validate in a template
- Bind to WPSetAsThumbnail
- Ajax not firing properly using Firefox, but works in Chrome
- wp_enqueue_script won’t load in header?
- chosen jquery library not loading – is not a function error
- wp_enqueue_script and wp_register_script in theme not working
- wp_enqueuescript won’t load in footer even with true value set?
- jQuery Ajax() doesn’t work when the page is accessed as a WordPress template page
- Appending anchor tag to next post
- How to Use JSON With AJAX?
- How wp_enqueue_script works?
- wp_localize_script, variable is not defined in jquery
- Enqueue jQuery in WordPress
- How to load whole WordPress pages dynamically with AJAX/jQuery like this following website?
- WordPress Script Loading/Unloading — wp_deregister_script(‘jquery’)
- Using wp_ajax and wp_ajax_nopriv hooks
- How do I activate jQuery/script on demand?
- WP REST return value to error function from Request
- Adding jQuery dependency prevents my script from enqueuing/loading
- How do I get my page to load the jQuery UI Effects library?
- Creating custom AJAX requests
- jQuery on Underscores menu
- Simple jQuery Click Not Working, though console log recognizes the function [closed]