#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2010
    Posts
    81
    Rep Power
    5

    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. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,317
    Rep Power
    7170
    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
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2010
    Posts
    81
    Rep Power
    5
    attached html may help a little more
    Attached Files

IMN logo majestic logo threadwatch logo seochat tools logo