Proper use of jquery
-
Hello ??
I have a question about proper use of jquery in wordpress themes,
in this moment i use jquery in header.php like this :<script src="<?php bloginfo('template_url'); ?>/js/totop.js"></script> <script src="<?php bloginfo('template_url'); ?>/js/categories.js"></script> <script src="<?php bloginfo('template_url'); ?>/js/pages.js"></script> <script src="<?php bloginfo('template_url'); ?>/js/jquery.fittext.js"></script>
it is proper use or not ?
or should i use like this in fuctions.php
wp_enqueue_script('jquery-1.7.1.min.js', get_template_directory_uri().'/js/jquery-1.7.1.min.js'); wp_enqueue_script('categories.js', get_template_directory_uri().'/js/categories.js'); wp_enqueue_script('pages.js', get_template_directory_uri().'/js/pages.js'); wp_enqueue_script('totop.js', get_template_directory_uri().'/js/totop.js'); wp_enqueue_script('jquery.fittext.js', get_template_directory_uri().'/js/jquery.fittext.js'); wp_enqueue_script('fittext.js', get_template_directory_uri().'/js/fittext.js');
Or do you have a suggestion as to how I should use it ?
Thank you !!!! ??
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Proper use of jquery’ is closed to new replies.