adding javascript and using javascript
-
Hello,
I am using two scripts on my site they are enqueue in the functions file of my child theme using the:<?php add_action('init', 'loadJs'); function loadJs() { if (!is_admin()) { wp_register_script('jquery.imgpreload.min', get_stylesheet_directory_uri() . '/js/farinspace/jquery.imgpreload.min.js'); wp_enqueue_script('jquery.imgpreload.min'); wp_register_script('marquee', get_stylesheet_directory_uri() . '/js/marquee.js', array('jquery') ); wp_enqueue_script('marquee'); } } ?>
the only way I can get these to run is if I do a find and replace in both js files and use find $ and replace with jQuery, so now is that correct, or am I setting myself for conflicts?
Thanx a million,
henryLemmon
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘adding javascript and using javascript’ is closed to new replies.