How to add jQuery file in your web page ?


Tuesday, April 19, 2011

Hello Friends,

Take care during adding JQuery file in header of your page.

Check out this code before knowing the issue..


<html>
<head runat="server">
    <title>TenderContent Page</title>

    <script type="text/javascript" src="js/jquery-1.4.1.js"></script>

    <script type="text/javascript" src="js/jquery.validate.js"></script>

    <script type="text/javascript" src="js/jquery.alerts.js"></script>
</head>
<body>
    <div>
            Rajesh Singh
        </div>
</body>
</html>


You can see, i have added three jQuery files in above code,

Issue : If you feel you can add this file like below code

    <script type="text/javascript" src="js/jquery-1.4.1.js"/>

    <script type="text/javascript" src="js/jquery.validate.js"/>
    
    <script type="text/javascript" src="js/jquery.alerts.js"/>

Then you are wrong, if you will add like above then you will not get any error but you wont be able to preform jquery function what you wanted to do, jQuery will not work.

So please take care to add jquery during adding jquery file in your page.

Hope this post will help you,
if yes please put comment below of this page,
Rajesh Singh,
Senior Asp.Net Developer
Email: raj143svmit@gmail.com
e-Procurement Technologies Ltd (India)
www.abcprocure.com