title: jquery Datepicker error datepicker is not defined
body: <p>While using date picker in my code its working when I have not called it inside the function like :</p>
  
  <pre><code> &lt;script src="~/Content/js/bootstrap-datepicker.js"&gt;&lt;/script&gt;
  
      &lt;script type="text/javascript"&gt;
  
              $('.datepicker').datepicker({
                  autoclose: true,
                  format: 'dd/mm/yyyy'
              });
      &lt;/script &gt;
  </code></pre>
  
  <p>But when I am calling this inside function :</p>
  
  <pre><code>&lt;script src="~/Content/js/bootstrap-datepicker.js"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
      $(document).ready(function () {
          $('.datepicker').datepicker({
              autoclose: true,
              format: 'dd/mm/yyyy'
          });
      });
  &lt;/script &gt;
  </code></pre>
  
  <p>its giving me error date picker is not defined. 
  Please tell me where I am wrong. Thanks in advance.</p>