Home › Forums › CSS › JQuery validator not working in WordPress › Re: JQuery validator not working in WordPress
January 21, 2011 at 2:58 pm
#64749
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:
>
if (function_exists('is_tag') && is_tag()) {
single_tag_title("Tag Archive for ""); echo '" - '; }
elseif (is_archive()) {
wp_title(''); echo ' Archive - '; }
elseif (is_search()) {
echo 'Search for "'.wp_specialchars($s).'" - '; }
elseif (!(is_404()) && (is_single()) || (is_page())) {
wp_title(''); echo ' - '; }
elseif (is_404()) {
echo 'Not Found - '; }
if (is_home()) {
bloginfo('name'); echo ' - '; bloginfo('description'); }
else {
bloginfo('name'); }
if ($paged>1) {
echo ' - page '. $paged; }
?>
…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.