Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Dec 2007
    Posts
    65
    Thanks
    1
    Thanked 0 Times in 0 Posts

    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();
    }
    });

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,728
    Thanks
    6
    Thanked 1,015 Times in 988 Posts
    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.

  • #3
    New Coder
    Join Date
    Dec 2007
    Posts
    65
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by VIPStephan View Post
    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
    Attached Files Attached Files


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •