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 ?
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 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
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.