title: TypeError: $("#city").autocomplete is not a function
body: <p>This is my php page coding:</p>
  
  <pre><code>&lt;script type="text/javascript" src="js/addclasskillclass.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/attachevent.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/addcss.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/tabtastic.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/ajax.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/ajax-dynamic-list1.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/backtotop.js"&gt;&lt;/script&gt;
  &lt;link type="text/css" rel="stylesheet" href="calendar/dhtmlgoodies_calendar.css?random=20051112" media="screen"&gt;&lt;/LINK&gt;
  &lt;script language="javascript" type="text/javascript" src="calendar/dhtmlgoodies_calendar.js?random=20060118"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/jquery.autocomplete.js"&gt;&lt;/script&gt;
  &lt;script&gt;
  $(function() {
      $(window).scroll(function() {
          if($(this).scrollTop() != 0) {
              $('#toTop').fadeIn();   
          } else {
              $('#toTop').fadeOut();
          }
      });
  
      $('#toTop').click(function() {
          $('body,html').animate({scrollTop:0},600);
      }); 
  });
  &lt;/script&gt;
  &lt;script&gt;
  $(document).ready(function(){
   $("#city").autocomplete("autocityuser.php", {
          selectFirst: true
      });
  });
  &lt;/script&gt;
  
  &lt;form method="get" name="frm1" id="frm1" action="#"&gt;
  &lt;input type="text" id="city" name="city" value="" style="width:160px;" size="30" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>When i load this page the FF shows me this error:
  TypeError: $("#city").autocomplete is not a function</p>
  
  <p>I've applied the same code for <code>autocomplete</code> on another page (but with less js imports) and it is working fine.
  but it is showing me error on this page, may be beacause some js is conflicting.
  Can anyone help me to solve this error???</p>
  
  <p>P.S. I forgot mention that i have 2 forms on this page both with different ids and names</p>
  
  <p>P.S. I still don't know what the problem was , but fortunately 
  <strong>The problem is solved</strong>,
  i just put below code at the end of the page and everything works perfect.</p>
  
  <pre><code>&lt;script&gt;
      $(document).ready(function(){
       $("#city").autocomplete("autocityuser.php", {
              selectFirst: true
          });
      });
      &lt;/script&gt;
  </code></pre>