Thursday, 4 April 2013

jQuery: External javascript function not working

External javascript function not working:

  • If you drag and drop the file into user control page then it add the file as following
    • <script src="../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
  • Just remove the ../ sign from reference like this and it will work
    • <script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>

Call javascript function on pageloading:

$(document).ready(function() {
        alert("Hey i got fired on page load..");
    });

No comments:

Post a Comment