Click here to Skip to main content
15,893,594 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How do we run jQuery?? Do we need to save that jQuery file to our website related path... And also do we need any java script for running any jQuery??? As I'm very weak in java and jQuery..
Posted
Updated 7-Mar-13 22:12pm
v2
Comments
Richard MacCutchan 8-Mar-13 4:12am    
Jquery is Javascript, not Java.
Rasika Khambayate 8-Mar-13 4:43am    
Hey Richard thank you for solving my problem...

1 solution

Hey, why don't you start with a simple tutorial for Jquery. The links below might be helpful to you:

http://www.w3schools.com/jquery/default.asp[^]

http://www.jquery-tutorial.net/[^]

You need to refer the jQuery file in your web app as below:

XML
<!DOCTYPE HTML >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> My First JQuery Page</title>

</head>
<body>
<div id="mydiv">This is the DIV
</div>
<input id="textName" type="text" />

<script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {

        $("#mydiv").css("background-color", "Red");
       $("#mydiv").css("background-image", "/Images/pic1.jpg");

    });


</script>
</body>


</html>


In the above example, i have saved the jQuery file inside scripts folder in VS 2010.

As jQuery is a Javascript framework, you need to write your all your methods and stuffs inside your scripts tags, so yes you can say that Javascript is required.

Even you can use your notepad as an editor, save the jQuery file on your desktop and give the src as the desired path. No special IDE's are required as such.

Hope the above helps.

Regards
Anurag
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900