Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //http://wordpress.stackexchange.com/questions/64062/cannot-enqueue-jquery-correctly-using-google-cdn
- //http://codex.wordpress.org/Function_Reference/wp_enqueue_script#Load_a_default_WordPress_script_from_a_non-default_location
- function my_scripts_method() {
- wp_deregister_script( 'jquery' );
- wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.12/jquery.min.js');
- wp_enqueue_script( 'jquery' );
- wp_enqueue_style( 'uicss', '(path_ to_script_location)/my-custom-style.css' );
- wp_enqueue_script( 'uisel', 'http://jquery-ui.googlecode.com/svn/branches/labs/selectmenu/ui.selectmenu.js' );
- wp_enqueue_style( 'uicss2', 'http://jquery-ui.googlecode.com/svn/branches/labs/selectmenu/ui.selectmenu.css' );
- wp_enqueue_script( 'uiease', '(path_ to_script_location)/jquery.easing.1.3.js' );
- }
- //add_action('wp_enqueue_scripts', 'my_scripts_method'); // selectmenu would not work targeting wp_enqueue_scripts
- add_action('wp_head', 'my_scripts_method');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement