autocomplete "is not a function" autocomplete "is not a function" asp.net asp.net

autocomplete "is not a function"


That error usually means that jquery or the plugin hasn't yet been loaded. Check that you're function call isn't getting hit before the document is loaded:

$(function(){    var $searchBox = $('#mysearchBox');    $searchBox.autocomplete(...);});

Also check that the path to the javascript files are correct. Firebug or google chrome developer tools are useful for checking both of these issues.


It could be:

  1. The order that jquery.js get loaded.
  2. Duplicate jquery.js includes in the same page.


Maybe try using the jQuery.noConflict() method for a test. It basically just makes you use a different alias for jQuery. This worked for me in SF4.3.

var j = jQuery.noConflict();// Do something with jQueryj("div p").hide();// Do something with another library's $()$("content").style.display = 'none';