JQuery a unique thing part- I

Dear all,

from today onward’s i am giving some breif introduction of JQuery how it use, how to work with it. and after the whole session i will provide you best example of whole then Jquery stuff.

so starting from point to point

 

1. What is Jquery ?
Answer: Jquery is JavaScript Library whose main moto is to simplifiy the use of java script for a html document.
It is a light weight JavaScript Library that emphasis intraction between JavaScript & Html.
It simplify  traversing ,event handling , animation and  ajax.

2. How it Works ?
Answer: To Work with Jquery you have to copy the Jquery Js file in your project.
And refrence in your  page like  <script type=”text/javascript” src=”jquery.js”></script>
And you can use it. Second  point is that  you have to start Jquery in  $(document).ready event
And all the event will comes under this ready event.

3. Necessary component to work with Asp.net + Jquery?

Answer: For Jquery in Asp.net you need to have to copy two files in your Project and refrence in your project jquery-1.2.6-vsdoc.js & Jquery1.2.6.js

4. Traversing

Ans:

1) you can find particular element in below type

$(“#elementId) — Suppose there a div box with id dvTest <div id=”dvTest”> then we have to use $(“#dvTest”)

$(“element”), — Suppose there div box in page then if we want to change all the div box background color then we can find all the div with $(“div”)

$(“element”).eq(index) — Now if we want to change the background of of first div only then $(“div”).eq(1) here eq(1) change the background color of index 1 div

$(“element”).find() — Search all the element that match with particular expression like $(“div”).find(“p”) here we find all the p which are in div tag

$(“element”).contnent()- it work same as find

$(“element”).next() – will find next sibling after element.

$(“element”).nextAll() – wiil find all next sibling after element but not there child element.

$(“element”).length() – determine number of element in document
$(“element”).parent.get(0)- will return the parent of element….

$(“element”).prev ;- get the privious sibling of each of element…

 

you can download Jquery files from www.JQuery.com its free.

and  you will find tutorial also over there.

i will back soon with my second part of JQuery.

Thanks

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s