This isn’t WP related but Its not working because you are trying to add an event to a dynamically created element.
Replace…
jQuery( '.remove_field' ).on("click", function(e){
e.preventDefault(); jQuery(this).parent('div').remove();
});
With
jQuery( 'body' ).on("click", '.remove_field', function(e){
e.preventDefault(); jQuery(this).parent('div').remove();
});
You can read more about your issue here.
Related Posts:
- How to add a ” waiting” icon for an ajax in WP frontend?
- How to prevent WordPress from loading the jQuery library at the top of the page
- Using Underscore Templates in WordPress
- Best approach for loading a sidebar Only if the screen max-width is >900px?
- Unable to run jQuery script in my template file
- modifying a template and adding jQuery to it
- Is it safe to include a javascript file in a template’s php file?
- Remove WordPress scripts
- Will the latest Bootstrap work properly with the default WordPress jQuery?
- How to make an WordPress element sticky? [closed]
- Searching multiple tags and adding jQuery dependant script onto page template?
- JQuery load php – php file without the template
- JQuery Issues With WordPress Theme Interface
- error: n.imagesLoaded is not a function
- jQuery $(this) keyword
- JavaScript error (Uncaught SyntaxError: Unexpected end of input)
- Disable button in jQuery
- JavaScript error (Uncaught SyntaxError: Unexpected end of input)
- $.ajax – dataType
- How can I get the ID of an element using jQuery?
- How do you select a particular option in a SELECT element in jQuery?
- How to use jQuery qTip?
- Installing jQuery?
- Email validation using jQuery
- Wildcards in jQuery selectors
- jQuery: How can I create a simple overlay?
- XML Parsing Error: not well-formed in FireFox but good in Chrome
- jQuery get value of selected radio button
- javascript function wait until another function to finish
- Clear form fields with jQuery
- How to use radio on change event?
- How can I change the text color with jQuery?
- How to get mouse position in jQuery without mouse-events?
- Show div #id on click with jQuery
- ajax stopped working when not logged in?
- Is there a way to enable Cross-Origin Resource Sharing for WordPress’ ajaxurl?
- How to get attachment id as soon as it is uploaded through media uploader in jquery?
- Using ‘$’ instead of ‘jQuery’ in WordPress
- AJAX call returns 0
- Is it possible to get the logged in username in a jquery script?
- Gravity Forms loading jquery
- Extend 3.5 media uploader plugin to change button name
- WordPress and jQuery [closed]
- Any good lightbox-like option that works in WP 3.2.1?
- Javascript included but alert() function not working
- Adding fields to the media uploader with jquery listeners
- Bind to WPSetAsThumbnail
- How do I activate jQuery/script on demand?
- How to delete post attachments when jQuery is used with a click event on the delete link
- How to properly add Bootstrap and JQuery Javascripts?
- Using multiple versions of jQuery while still calling it like WP likes
- adding google event tracking to links in posts
- Override default jquery ui library with newer version
- Can I make simple global tooltips in WordPress?
- WordPress Jquery Confliction with Plugin
- Is there a restriction in WP on the use of jQuery load function?
- Periodically getting jQuery “…. is not a function” errors [closed]
- Unwanted content in website title
- HTML editor accessing quicktag buttons
- Error when posting comment form: The error is TypeError: e[h] is not a function
- How to use datepicker.min.js?
- Exclude some scripts from removing unique scripts from head function
- Using Javascript to detect keypress event in text editor
- videopress videos are not displayed when loading the content with ajax in a lightbox
- Bypass nonce value while trashing a post
- How to enqueue jquery in admin and why is it not already there?
- Call a javascript function from another file
- Set TRUE or FALSE based on a wp_localize_script option value
- Simplest ajax form not working when it should
- Changing WordPress URL breaks some jquery functions
- Extend the twentyten dropdown menu with jQuery with a delay onmouseout
- Notice-Updated div moving around unprompted
- How to display comments length
- Jquery contact form to send mail to admin [closed]
- Can user meta be shown or hidden depending on user logged in status?
- Screen Options JavaScript Code
- Getting jQuery AJAX to work in WordPress (getting -1)
- Theme has superfish – how to add supersubs?
- Absolute path to stylesheet_dir/images/my_img.jpg does not work?
- Which hook to use when adding ajax to viewer-facing side?
- jquery bookmark links
- WordPress and Modal Popup – how to make the already loaded javascript assets available in modal?
- Theme style overrides the plugin style
- jQuery .html rendering [closed]
- Special Characters and Spaces are not transferred correctly via AJAX call.
- How to manipulate elements on the Insert Media Attachment settings popup
- Site images are fixed in front of my site content [closed]
- jQuery not working for media uploader
- Adding text to links when not on the homepage
- how to remove/exclude html coding from json file while export?
- search in jquery mobile returns blank page
- Uncaught TypeError: undefined is not a function (shortcode-box)
- $ not defined using jQuery in WordPress
- Group posts by weekly or monthly
- adding the full image path to a wordpress javascript file
- Ensure an external javascript file called from plugin is loaded after jquery is called
- jQuery not working for tabs shortcode [closed]
- Why my vertical tab js code is refreshing the page continuously? [closed]
- jQuery cycle thumbnails?
- Contact Form 7 – Submit Form not working After Ajax Request [closed]