Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS JQuery validator not working in WordPress Re: JQuery validator not working in WordPress

#64749
Alan_Breck
Participant

Thank you for the reply! I did as you advised… I think :-)… but somehow it’s still not working. When the hover effect worked properly, the validator would not and vice versa. Please forgive my ignorance here, but am I missing something in my header to call those files out of the functions.php file? Here is my header code:


>








<br /> <?php<br /> if (function_exists('is_tag') && is_tag()) {<br /> single_tag_title("Tag Archive for ""); echo '" - '; }<br /> elseif (is_archive()) {<br /> wp_title(''); echo ' Archive - '; }<br /> elseif (is_search()) {<br /> echo 'Search for "'.wp_specialchars($s).'" - '; }<br /> elseif (!(is_404()) && (is_single()) || (is_page())) {<br /> wp_title(''); echo ' - '; }<br /> elseif (is_404()) {<br /> echo 'Not Found - '; }<br /> if (is_home()) {<br /> bloginfo('name'); echo ' - '; bloginfo('description'); }<br /> else {<br /> bloginfo('name'); }<br /> if ($paged>1) {<br /> echo ' - page '. $paged; }<br /> ?><br />















…and here is my functions.php code:

		if (!is_admin()) {
wp_deregister_script('jquery'); //Stop WordPress default jQuery
wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js', false, '1.3.2'); //Load Googles jQuery
wp_enqueue_script('jquery');

//Load jquery plugin
wp_register_script('jquery_validator','/wp-content/themes/priest/js/jquery.validate.js', 'jquery', '1.0'); //'jquery' is passed as a reference so that this loads AFTER 'jquery'
wp_enqueue_script('jquery_validator');

//Load custom script
wp_register_script('custom','/wp-content/themes/priest/js/page.js', 'jquery_validator', '1.0'); //'jquery_validator' is passed as a reference so that this loads AFTER the plugin
wp_enqueue_script('custom');
}

Thank you again for your help!

~A.B.