Last active
July 28, 2021 11:37
-
-
Save wireinet/759a0f8ee22b2266e4a1cce6d08281d1 to your computer and use it in GitHub Desktop.
Wordpress jquery code in file
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($) { | |
//your code | |
})(jQuery); | |
// или | |
jQuery( document ).ready(function( $ ){ | |
//code | |
}); | |
// подключение своего jquery: | |
function my_jquery_scripts() { | |
wp_deregister_script( 'jquery' ); | |
wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'); | |
wp_enqueue_script( 'jquery' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'my_jquery_scripts' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment