I am not sure this is your problem if you are not getting any errors, but make sure you have your jQuery code within document ready wrappers and pass the $ in to make sure you can access it since WordPress runs in no-conflict mode.
jQuery(document).ready(function($) {
$("input").keyup(function(){
$("input").css("background-color","pink");
});
});
It would also be good to declare jQuery as a dependency just to be safe.
wp_enqueue_script( 'my_custom_script', get_template_directory_uri() . '/js/admin.js', array( 'jquery' ) );
Related Posts:
- Is not using admin-ajax to ajax submissions okay?
- Clear form fields with jQuery
- Get a form action/url with jquery
- Twitter Bootstrap Modal Form Submit
- Validate form before submit jquery
- WordPress AJAX File Upload – FrontEnd
- jQuery and AJAX Not working with Select Form Element
- Add X meta box inputs based on form at top of meta box, how to do it right?
- How to Use JSON With AJAX?
- Registration e-mail check with AJAX
- jQuery Validate wp_editor
- Gravity Forms not loading under https, jQuery is not defined
- Gravity list field override and adding javascript [closed]
- Admin wp_ajax hook returning 0
- Edit single attachment on click (WP-admin)
- How do I setup nested repeatable option fields?
- Adding a character counter to the excerpt metabox
- Accept AJAX call with serialized form data
- WP Admin missing icons, numerous JavaScript errors, but only when SCRIPT_DEBUG is false
- Returning content via jQuery without footers on admin pages
- Can’t load a class into WordPress post editor’s content field
- Making the wordpress login form a jQuery dropdown
- Cannot prefill hidden Ninja Forms fields
- Unable to uncheck checkbox with jquery in wp admin
- Hide metabox dependant on page template chosen
- jQuery is missing in wp-admin
- Frontend Post with JQuery AJAX to Php Issue
- Bypass nonce value while trashing a post
- wp_dequeue_script not working in my plugin
- How to isolate code to the post edit screen
- Ajax form submit not working, returns 0
- Admin side jquery is not loaded
- Using Foundation 5 in WordPress Administration Area
- jQuery will not work on page from snippet or file
- Notice-Updated div moving around unprompted
- Adding JavaScript file in Admin Panel
- JQuery Counter Limit not working for WP Comment Textarea
- Required radio button does not validate in form, when clicked through Javascript/jQuery
- Applying jquery to WordPress admin edit.php
- Duplicate “default” form with jQuery
- Is there a default way in wordpress to create a overlay in the dashboard?
- Screen Options JavaScript Code
- Converting a working AJAX form to work with WordPress
- jQuery forms & updating info
- How to setup multi-page using jquery?
- Is textarea always accesible throught textarea#content in wordpress dashboard for a specific page?
- Auto next upon clicking image without clicking Next button
- jQuery Validation plugin and Bootstrap 4 CSS classes
- Form validation before submitting
- Dashboard controls have all stopped working
- $_POST empty in using new php file added to theme
- value not saving in the form when dynamically creating an input
- Uncaught TypeError: undefined is not a function (shortcode-box)
- JQuery multiple toggle values
- Auto Select Child categories on Multiple Dropdown – Jquery
- Adding jQuery timepicker to contact form
- jQuery form plugin, submit in the wordpress way
- jQuery Live Form Validation in WordPress
- jQuery .change() Event Bubbling in WP Admin
- Hook with jquery script is not working in wp-admin [closed]
- Contact Form 7 checkbox to add a new class to a div [closed]
- jQuery color picker function on change
- jQuery datepicker not showing on admin menu
- Override default options in plugin metaboxes
- Elementor form – checkboxes validation
- Bootstrap with separate js File
- jQuery not working for media uploader
- Submitting custom post from frontend,jQuery ajax, and custom validation – can’t find proper place to insert wp_insert_post()
- jQuery plugin is loaded correctly, but does nothing
- Call full image url instead of stylsheet directory url in JS for Infinite Scroll Function
- Adding scripts before plugins scripts
- Jquery script with comments ID’s
- Move jQuery on *top* of footer
- jQuery.post() calling function with parameter
- How to toggle custom WP archive list
- I can’t enqueue Suggest.js in frontend – not added
- Form not working as it should in WordPress, but in a normal HTML site it does
- Jquery code won’t run loaded from WP, but run from console
- Jquery not loading / running on WordPress home page
- comment-reply.js disables any other form javascript
- WP Media Uploader modal conflicts with Bootstrap modal
- JQuery and Javascript to pan image
- File not enqueueing
- Submitting my form to the database and then redirecting to payment site
- jQuery search function not running in WordPress but running locally (fiddle)
- Enqueue script, taking no effect [closed]
- Masonry – Can’t Find Variable imagesLoaded
- How to blur the_post_thumbnail() via blur.js (jquery)?
- Refresh widget admin page resetting jQuery hidden class
- Custom button on admin page doesn’t trigger click event
- Autocomplete for titles via ajax – rework of past post away from like_escape()
- Adding text to links when not on the homepage
- how to remove/exclude html coding from json file while export?
- Passing variable data from external jQuery file to options.php
- WordPress and Raty.js
- JQuery Login Dropdown not functioning in theme
- Custom Javascript not working? [closed]
- How to get this jQuary script working?
- Jquery being loaded wrong
- What to do after a wrong RewriteRule?