Hey use admin_enqueue_scripts.
if you want to load a set of CSS and/or Javascript documents to all admin pages. You can do this from within your plugin or from your themes function file using admin_enqueue_scripts:
function class_table_scripts() {
wp_register_script( 'JavaScript1', plugins_url('js/wcs.css'), array() );
wp_enqueue_script('JavaScript1');
wp_register_script( 'JavaScript1', plugins_url('js/jquery.qtip-1.0.0-rc3.min.js'), array('jquery') );
wp_enqueue_script('JavaScript1');
}
add_action( 'admin_enqueue_scripts', 'class_table_scripts' );
Related Posts:
- Move WordPress native javascript to bottom of page?
- RequireJS in custom theme. Working Example
- How to get a jQuery script to run on a page?
- Including javascript for a shortcode
- Asynchronous Javascript Loaders
- wp_enqueuescript won’t load in footer even with true value set?
- How wp_enqueue_script works?
- How do I get my page to load the jQuery UI Effects library?
- Script won’t execute in the media manager
- How to properly add Bootstrap and JQuery Javascripts?
- Enqueuing javascript files
- Searching multiple tags and adding jQuery dependant script onto page template?
- How to enque js script in footer that are not in .js file?
- Loading scripts on a single page plants the script in the footer
- Using WP functions inside javascript
- Including Older Version of jQuery for IE7/IE8
- How To Include JavaScript Files Only In Single Posts?
- Fire action after enqueue script
- How to make JQuery load on top of head tag before everything
- JavaScript code do not works on online server
- Bootstrap with separate js File
- Move jQuery on *top* of footer
- I can’t enqueue Suggest.js in frontend – not added
- How to add JS snippet before closing tag?
- Enqueue javascript that inserts custom php widget into jQuery-constructed div
- How to Run a jQuery Script after a Javascript Script has Finished in WordPress
- javascript not loading in wordpress
- bootstrap-slider.js by seiyria not working in wordpress
- JavaScript error (Uncaught SyntaxError: Unexpected end of input)
- JavaScript error (Uncaught SyntaxError: Unexpected end of input)
- My javascript is returning this error: $.ajax is not a function
- Rotate image with javascript
- How to make a simple image upload using Javascript/HTML
- javascript function wait until another function to finish
- Javascript – ERR_CONTENT_LENGTH_MISMATCH
- 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
- Automatically decrease font size for long words
- Gravity Forms loading jquery
- Javascript included but alert() function not working
- wp_enqueue_script won’t load in header?
- jQuery Hoverintent plugin in TwentyEleven Menu [closed]
- How do I activate jQuery/script on demand?
- Using multiple versions of jQuery while still calling it like WP likes
- wp_enqueue_scripts hook is not being called
- WordPress Jquery Fade in, Fade out effect
- wp_ajax unauthenticated and authenticated
- Override default jquery ui library with newer version
- Enqueue Google CDN jQuery in Footer
- ‘jQuery is not defined Error’ appearing in load-scripts.php
- Gutenberg Filtering Metaboxes by Post Format
- JSON output returns page source code [closed]
- No data received
- CodeMirror on Custom Widget Textarea
- Sending click events to Google Analytics in WordPress: the easy way
- start.js:45TypeError: Not enough arguments on Safari [closed]
- Help with a jQuery Carousel
- Exclude some scripts from removing unique scripts from head function
- videopress videos are not displayed when loading the content with ajax in a lightbox
- How to enqueue jquery in admin and why is it not already there?
- Call a javascript function from another file
- Fall Back Google CDN in JavaScript
- wp_enqueue doesn’t work
- Trouble enqueueing jquery with custom theme
- Why doesn’t jQuery use $, and how can I get it do so (GLOBALLY)?
- I have an old version of jQuery showing up. How do I figure out where it is coming from?
- registering new jQuery after wp_deregister_script() not working
- Search input area autogrow – how?
- Get value of selected option in select field in a WordPress form
- Required radio button does not validate in form, when clicked through Javascript/jQuery
- jQuery plugin not loading
- Blur.js with WordPress – Enqueued, but server not finding file
- Screen Options JavaScript Code
- Is there some jQuery conflict here?
- Theme has superfish – how to add supersubs?
- Which hook to use when adding ajax to viewer-facing side?
- WordPress not showing jQuery
- Add JQuery As Code Snippet
- Form validation before submitting
- Site images are fixed in front of my site content [closed]
- JQuery toggle in Visual Composer
- jQuery not working for media uploader
- How to toggle custom WP archive list
- WordPress and Raty.js
- JQuery Login Dropdown not functioning in theme
- Retrieve customizer value using ajax or customizer api and print the value in theme
- Uncaught TypeError: undefined is not a function (shortcode-box)
- jQuery AJAX add json2 dependency?
- jQuery does not appear to be enqueued on static homepage
- Running javascript in a child theme. Works in jsfiddle
- How to block action if post is “dirty”?
- WordPress video end function [duplicate]
- Ensure an external javascript file called from plugin is loaded after jquery is called
- Why my vertical tab js code is refreshing the page continuously? [closed]
- Monarch JS has not been loaded. After changing the $dep parameter, it start being loaded
- Theme now uses require.js and enqueue script no longer works
- jQuery issue and wp_enqueue_script
- Individual Pages are loading halfway down
- Widget won’t work due to old JavaScript? Any ideas how to make it work? [closed]