February 5th, 2013, 03:16 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();
}
});
February 5th, 2013, 05:33 PM
-
Do you have a <script> tag pointing at jQuery before those statements are run?
PHP FAQ
Originally Posted by Spad
Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
February 6th, 2013, 02:36 AM
-
attached html may help a little more