.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Sandeep Singh


How to Start using JQuery


Introduction :

In this tutorial we will see how to start using JQuery in our web application in asp.net. We will also see the syntax of the Jquery

We have seen the Introduction of JQuery and answered few frequently asked question in the 1st tutorial here

Now we will see how to start Jquery in our asp.net application or Asp.Net website or Web Application

But before that lets see the JQuery syntax

$(document).ready(function() {

// Your rest JQuery logic code goes here


This line smeans

($(document)) JQuery Win the document Meaning win the page and is (.ready) Ready to manipulated Means when all the data is loaded than we are going to write some code.

again in another way the above lines tell a web page that

JQyery Get the document when the document is ready to manipulated we are going to run a function and the function is you code what do you want to do using JQuery function

Now to get the HTML element you have to write this code


The above code means

($) Jquery get the element whose id is myElementId

NOTE: if you are working in .aspx page and HTML controls like <p>, <div> etc tag you have append # with the element id and if you have working with simple .html or .htm page than you can just write

$('myElementId') without # to JQuery to get the element whose id is myElementId

If you are using asp.net controls like as.net TextBox control, Asp.net Button control etc than to get the control using JQuery weh have write the code like this

$('#<%=txtUserName.UniqueID %>')

Now if you want to hide the control whose id is myElementId than we have to wite JQuery code like this. In below code myElementId is the id of <p> paragraph tag

In the next chapter we will see some more JQuery function to design our web page.
Other Tutorials in the same Category:
  • JQuery In Asp.Net      
  • How to Start using JQuery      
  • Show hide control using JQuery      
  • Slide the Text or control using JQuery      
  • Animation Text or control using JQuery

    Return to Main Index Page

    Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend