How to add Jquery in footer in wordpress
Hello
<? php
fun ction myphpinformation_scr ipts( ) {
if you want to add any js file in to footer please set parameter true
Want to add footer it makes it true check in my myphpinformation_scripts ( ) function.
i think this blog can help to add jque ry in footer
i f you want to add any js file under another js file in arr ay( 'jquery') in my function add name theo r ef y our js giving in wp_enqueue_script
If I want to a dd aft r er scr i pt . js then check below code
add this type. arra y ( 'scrol l').
scroll name of added js check in functionchec k it i hope it can help.
wp_enqueue_script( 'scroll', get_stylesheet_directory_uri( ) . '/js /script. js ', array( 'jquery'),'', true);
}
add_action( 'wp_enqueue_scripts', 'myphpinformation_scripts' ) ;
?>
Forth parameter for wp_enqueue_script my default is fl ase i f you
.
wp_enqueue_script( 'scroll', get_stylesheet_directory_uri( ) . '/js /script. js ', arra y( 'scroll'),'', true)
;
scroll name of added js check in function
0 komentar:
Post a Comment