Created
July 2, 2014 16:30
-
-
Save anonymous/cadd3e7238cb391ad6b5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function awordpress_load_scripts($hook) { | |
if( $hook != 'users.php' ) | |
return; | |
wp_enqueue_script( 'tablesorter', plugins_url( 'js/jquery.tablesorter.js' , dirname(__FILE__) ), array( 'jquery' ) ); | |
wp_enqueue_script( 'custom-js', plugins_url( 'js/custom.js' , dirname(__FILE__) ), array( 'tablesorter' ) ); | |
} | |
add_action('admin_enqueue_scripts', 'awordpress_load_scripts'); | |
where in the custom.js you should put something like the following | |
jQuery(document).ready(function($) { | |
$(".users").tablesorter(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment