below is my My Code
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
And my Html code is
<div class="ui-widget">
<input name="searcharea" class="selectarea" id="searcharea" type="text" value="" placeholder="Area">
</div>
And my Function is
<script>
$(function(){
$( "#searcharea" ).autocomplete({
source: "suggestions.php"
});
$( "#searchcat" ).autocomplete({
source: "suggestions1.php"
});
});
</script>
I have included this page into a seperate file with search code of my website and I have embeded it on various pages, On my index page, it is suggesting me values from source files, but on other pages it is giving me typerror on line
$( "#searcharea" ).autocomplete({
My website link is:
http://www.jodhpuryp.in/
This is source of my autosuggestion box
http://api.jqueryui.com/autocomplete/
Can anybody tell me, why I am getting this error on other pages of my website while its working on index page.Any help is appreciated.Thanks
question from:
https://stackoverflow.com/questions/19591155/autocomplete-is-not-a-function-error 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…