• On that site the city fields are supposed to autocomplete but something in the code below is not allowing it. I have WP GeoNames v1.8 installed and US MX and CA are loaded. 
    
    My Code is 
    
    // Initialize city autocomplete
             $(".city-autocomplete").each(function() {
                    var countries = $(this).data("countries");
                    $(this).wpGeonamesAutocomplete({
                        countries: countries
                    });
    
    This is the error I am getting.
    
    jquery-migrate.min.js?ver=3.4.0:2 JQMIGRATE: Migrate is installed, version 3.4.0
    jquery.min.js?ver=3.6.4:2 jQuery.Deferred exception: $(…).wpGeonamesAutocomplete is not a function TypeError: $(…).wpGeonamesAutocomplete is not a function
    at HTMLInputElement. (https://travelvex.com/business-travel/:343:25)
    at Function.each (https://travelvex.com/wp-includes/js/jquery/jquery.min.js?ver=3.6.4:2:3003)
    at e..each (https://travelvex.com/wp-includes/js/jquery/jquery.min.js?ver=3.6.4:2:1481)
    at HTMLDocument. (https://travelvex.com/business-travel/:341:34)
    at e (https://travelvex.com/wp-includes/js/jquery/jquery.min.js?ver=3.6.4:2:30158)
    at t (https://travelvex.com/wp-includes/js/jquery/jquery.min.js?ver=3.6.4:2:30460) undefined
    S.Deferred.exceptionHook @ jquery.min.js?ver=3.6.4:2
    t @ jquery.min.js?ver=3.6.4:2
    setTimeout (async)
    (anonymous) @ jquery.min.js?ver=3.6.4:2
    c @ jquery.min.js?ver=3.6.4:2
    add @ jquery.min.js?ver=3.6.4:2
    (anonymous) @ jquery.min.js?ver=3.6.4:2
    (anonymous) @ jquery-migrate.min.js?ver=3.4.0:2
    e. @ jquery-migrate.min.js?ver=3.4.0:2
    then @ jquery.min.js?ver=3.6.4:2
    S.fn.ready @ jquery.min.js?ver=3.6.4:2
    showFields @ (index):335
    onchange @ (index):202
    trigger @ jquery.min.js?ver=3.6.4:2
    (anonymous) @ jquery.min.js?ver=3.6.4:2
    each @ jquery.min.js?ver=3.6.4:2
    each @ jquery.min.js?ver=3.6.4:2
    trigger @ jquery.min.js?ver=3.6.4:2
    (anonymous) @ jquery.nice-select.min.js?ver=1.0:4
    dispatch @ jquery.min.js?ver=3.6.4:2
    y.handle @ jquery.min.js?ver=3.6.4:2
    jquery.min.js?ver=3.6.4:2 Uncaught TypeError: $(…).wpGeonamesAutocomplete is not a function
    at HTMLInputElement. ((index):343:25)
    at Function.each (jquery.min.js?ver=3.6.4:2:3003)
    at e..each (jquery.min.js?ver=3.6.4:2:1481)
    at HTMLDocument. ((index):341:34)
    at e (jquery.min.js?ver=3.6.4:2:30158)
    at t (jquery.min.js?ver=3.6.4:2:30460)
    (anonymous) @ (index):343
    each @ jquery.min.js?ver=3.6.4:2
    each @ jquery.min.js?ver=3.6.4:2
    (anonymous) @ (index):341
    e @ jquery.min.js?ver=3.6.4:2
    t @ jquery.min.js?ver=3.6.4:2
    setTimeout (async)
    S.readyException @ jquery.min.js?ver=3.6.4:2
    (anonymous) @ jquery.min.js?ver=3.6.4:2
    e @ jquery.min.js?ver=3.6.4:2
    t @ jquery.min.js?ver=3.6.4:2
    setTimeout (async)
    (anonymous) @ jquery.min.js?ver=3.6.4:2
    c @ jquery.min.js?ver=3.6.4:2
    fireWith @ jquery.min.js?ver=3.6.4:2
    fire @ jquery.min.js?ver=3.6.4:2
    c @ jquery.min.js?ver=3.6.4:2
    fireWith @ jquery.min.js?ver=3.6.4:2
    t @ jquery.min.js?ver=3.6.4:2
    setTimeout (async)
    (anonymous) @ jquery.min.js?ver=3.6.4:2
    c @ jquery.min.js?ver=3.6.4:2
    add @ jquery.min.js?ver=3.6.4:2
    (anonymous) @ jquery.min.js?ver=3.6.4:2
    (anonymous) @ jquery-migrate.min.js?ver=3.4.0:2
    e. @ jquery-migrate.min.js?ver=3.4.0:2
    then @ jquery.min.js?ver=3.6.4:2
    S.fn.ready @ jquery.min.js?ver=3.6.4:2
    showFields @ (index):335
    onchange @ (index):202
    trigger @ jquery.min.js?ver=3.6.4:2
    (anonymous) @ jquery.min.js?ver=3.6.4:2
    each @ jquery.min.js?ver=3.6.4:2
    each @ jquery.min.js?ver=3.6.4:2
    trigger @ jquery.min.js?ver=3.6.4:2
    (anonymous) @ jquery.nice-select.min.js?ver=1.0:4
    dispatch @ jquery.min.js?ver=3.6.4:2
    y.handle @ jquery.min.js?ver=3.6.4:2

    The page I need help with: [log in to see the link]

  • The topic ‘Error with code’ is closed to new replies.