Looking for a Tutor Near You?

Post Learning Requirement »
x

Choose Country Code

x

Direction

x

Ask a Question

x

x
x
x
Hire a Tutor

Jquery Basics Chapter 1

Loading...

Published in: Computer Science | Java Script
1,861 Views

Notes of Jquery

Daniel C / Chennai

6 years of teaching experience

Qualification: MCA (Jerusalem College of Engineering (JCE), Chennai - 2005)

Teaches: IT & Computer Subjects, School Level Computer, Computer Science, IT, Graphic Designing, HTML Training, Illustrator, Photoshop

Contact this Tutor
  1. JQUERY REFERENCE [Chapter 1]
  2. Jquery Basics What is Jquery? Jquery is a javascript library It simplifies the javascript program Purpose of Jquery is to use javascript on your website. How to add Jquery to webpages? DownloadJquery library from jquery.com • Include Jquery from CDN like Google What versions are available to download for Jquery? Production Version : It is for live website Development Version: It is for Testing and development What is JQuery library? Jquery library is a single javscript file. You can reference it with HTML tag Jquery CDN: You can include it from CDN (Content Delivery Network) Both Google & Microsoft host Jquery Google CDN:
  3. Microsoft CDN:
  4. Shorter method for document ready event: $(function() //jquery methods Jquery selectors: 1. 2. 3. 1. 2. Select and manipulate HTML elements Find HTML elements based on their ID, classes, types and attributes. Element Selector ID Selector Class Selector Element Selector $(document).ready(function() $("button").click(function(){ $("p").hide(); ID Selector [Eg] $(document).ready(function(){ $("button").click(function(){ $("#test").hide();
  5. 3. -Class Selector Find elements with a specific class $(". test") $(document).ready(function() $("button").click(function() $(". test"). hide(); Apply Jquery selectors on elements: — select all elernents $(this) — select current HTML element $("p. intro") — select all elements with class="intro" $("p.first") — select first element $("UI li:first") — select first element of first $("UI li:first-child") — select firstelement of every $("[href]") — select all elements with href attribute $("a[target='_blank']") — select all elements with target attribute value equal to " _ blank" $("a[targetl = blank']") — select all elements with target attribute value not equal to " _ blank"
  6. $(":button") — selects all elements & element of type="button" — select all even $("tr:odd") — select all odd elements Jquery Events: Jquery respond to events in HTML page [Eg] Moving a mouse over an element, selecting a radio button, clicking on an elernent Example for Events: Mouse events 1. Click 2. Dblclick 3. Mouseenter 4. Mouse leave Keyboard events 1. Keypress 2. Keydown 3. Keyup Form events 1. 2. 3. 4. submit change focus blur Document / Window Event: load resize scroll unload