CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   JavaScript frameworks (http://www.codingforums.com/forumdisplay.php?f=62)
-   -   javascript errors load (http://www.codingforums.com/showthread.php?t=287123)

qwertyjjj 02-05-2013 09:17 PM

javascript errors load
 
S, I just updated a theme on my WP site. I used to have some menus at the the top of the page with drop downs.

Any ideas what I have to fix: error 1=load is not a function
Code:

$(window).load(function(){
// Main Menu
main_menu();
// Greyscale Hover
if(!$.browser.msie) base_greyscale_hover();
});

error2=TypeError: $(...) is null on the validate form
Code:

function base_form() {
// Form AJAX and Validate
$('.validate-form, #commentform').each(function(){
$(this).validate({
errorPlacement: function(error, element) {
error.appendTo( element.siblings('.form-error-box') );
element.siblings('.form-error-box').hide().fadeIn();
}
});
});
$('.ajax-form').ajaxForm({
dataType: 'json',
beforeSubmit: function(arr, $form, options){
$('.form-response', $form).html('sending data …').fadeIn();
},
success: function(data, statusText, xhr, $form){
$('.form-response', $form).html(data.response_text);
$form[0].reset();
}
});


VIPStephan 02-05-2013 11:05 PM

Please show us the HTML on which the scripts are used. Especially the first one sounds like jQuery hasn’t been included properly. Also, $.browser has looong been deprecated and should not be used. Instead of browser detection you should do feature detection, e. g. using $.support.

qwertyjjj 02-06-2013 08:36 AM

1 Attachment(s)
Quote:

Originally Posted by VIPStephan (Post 1311190)
Please show us the HTML on which the scripts are used. Especially the first one sounds like jQuery hasn’t been included properly. Also, $.browser has looong been deprecated and should not be used. Instead of browser detection you should do feature detection, e. g. using $.support.

attached


All times are GMT +1. The time now is 03:31 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.