Could you do something like this?
function tag-added-script()
{
?>
<script>
jQuery(function($) {
$('.tagadd').click(function() {
// Run Your Jquery Here
alert('test');
});
});
</script>
<?php
}
add_action( 'admin_head', 'tag-added-script' );
The above will react whenever the “tagadd” button is clicked. Theoretically you could then grab the custom field ID and clear it via jquery.
Related Posts:
- Searching multiple tags and adding jQuery dependant script onto page template?
- Add a jQuery snippet for sepcific user role
- Why my vertical tab js code is refreshing the page continuously? [closed]
- JavaScript sleep/wait before continuing [duplicate]
- Why does my JavaScript code receive a “No ‘Access-Control-Allow-Origin’ header is present on the requested resource” error, while Postman does not?
- How do I link a JavaScript file to a HTML file?
- What does [object Object] mean? (JavaScript)
- Why does my JavaScript code receive a “No ‘Access-Control-Allow-Origin’ header is present on the requested resource” error, while Postman does not?
- Best way to store a key=>value array in JavaScript?
- Javascript Runtime error: $ is undefined
- Format date to MM/dd/yyyy in JavaScript
- Javascript isnull
- Javascript TypeError: Cannot read property ‘indexOf’ of undefined
- How to read data From *.CSV file using javascript?
- How to call a webservice method from an html page [javascript] with out refresh the page
- How can I remove all CSS classes using jQuery/JavaScript?
- I want to enqueue a .js file to my child theme
- Add custom shortcode button to Editor
- Infinite scroll / lazy loading with NextGen Gallery [closed]
- jQuery UI Datepicker not working
- Defer Parsing of Scripts
- Draggable item in custom gutenberg block
- Including javascript for a shortcode
- Asynchronous Javascript Loaders
- Unable to run jQuery script in my template file
- How to Use JSON With AJAX?
- Using wp_ajax and wp_ajax_nopriv hooks
- Hide/show customizer controls based on other settings in Customizer
- How do I get my page to load the jQuery UI Effects library?
- How to add unique image class to WordPress
- Dropzonejs with WPCF7 [closed]
- jQuery Tree View and wp_list_pages
- Jquery conflict
- WP Admin missing icons, numerous JavaScript errors, but only when SCRIPT_DEBUG is false
- Loading posts via AJAX in a hidden div with updated URL?
- wpColorPicker: How update colors on input value update?
- How to show jquery popup only in one page or once?
- Plugin admin panel JavaScript Broken
- Disable stored tags queries in admin page when posting a new post
- How to embed JS data viz in a simple WordPress website
- WooCommerce Ajax Cart Update Stopped Working
- Rhyzz Repeatable-fields javascript in php and wordpress
- Limit filetype and wp media
- window.onload wont execute in wordpress
- How to return multiple arguments from AJAX callback function
- JS news ticker is not working on home page but working on other pages. How to solve this?
- WP Customizer compare and set a value via javascript
- “JQMIGRATE: Migrate is Installed” How do I find the problem code? [duplicate]
- Referrer URL with jQuery or Javascript – Cache & Referrer URL Issue
- Create special WordPress slideshow with “jquery.cycle.all.js”
- Using Foundation 5 in WordPress Administration Area
- Plugin Scripts no loading on options page
- Ajax Validation for reCaptcha
- Using jquery and javascript in WordPress
- Disable Cloudflare Rocket Loader for jQuery javascript and make it load first
- Unable to get my javascript to work on my website – what am I doing wrong?
- jQuery selectable() function won’t work in wordpress
- oEmbed Video in Modal
- How do I get my suggest to only suggest one taxonomy?
- AJAX Success Function using JS substr() fails in WP 4.1 vs 4.0
- Assigning tags to a post from front end using tag-it jquery UI plugin
- How To Include JavaScript Files Only In Single Posts?
- wordpress before or after javascript problem
- Ajax page load in wordpress the right way?
- I am trying to Implement a Code that is Working in my previous page but not working in WordPress for some reason
- How to use $ with externally loaded javascript
- Getting click on item to open closest relevant element (popup) with jQuery
- How to make JQuery load on top of head tag before everything
- Show and hide element when URL contains certain section of text?
- Customizer add query to preview URL
- How to check a category checkbox using JavaScript
- why does so many javascript libraries are loaded along with my website?
- Why does my media selection script write to ONLY the first input field?
- Dashboard controls have all stopped working
- Notify user we would like them to clear their cookie. Provide a working button to clear cookies for user
- Modify the href attribute of tag dynamically in WordPress
- Bootstrap with separate js File
- Call full image url instead of stylsheet directory url in JS for Infinite Scroll Function
- Move jQuery on *top* of footer
- JQuery and Javascript to pan image
- How to blur the_post_thumbnail() via blur.js (jquery)?
- Custom Javascript not working? [closed]
- How to get this jQuary script working?
- Youtube Iframe Api play one video at a time
- How to add JS snippet before closing tag?
- Disable drag metaboxes, create many functions using js not to work!
- How to deregister scripts all at once
- How to load jquery tag-it plugin into admin?
- Trying to get fittext to work in WordPress
- Add jQuery function to media button
- How to Run a jQuery Script after a Javascript Script has Finished in WordPress
- jQuery ajax empty exeption on wordpress
- TypeError: $ is not a function Error using parallax effect in WordPress Template [duplicate]
- Custom jQuery plugin not working
- jQuery append only works if I select html in admin section [closed]
- Javascript Loading Effect to URLs
- Use WordPress Built In Jquery
- shortcode execution when the page is opened
- Sending jQuery variable to php function
- AJAX call not initializing for non-admins in WordPress