jQuery is a lightweight, open-source
JavaScript library (framework) that simplifies interaction between HTML and
JavaScript which makes the developer’s life easier
jQuery Notation
jQuery() = $()
· Represented by
both $ and jQuery
· Use
$.noConflict() (-for jQuery only), for other frameworks that use $
· By default,
represents the jQuery object. When combined with a selector, can
represent multiple DOM Elements.
· Used with
all jQuery functions.
jQuery Setup
· Step 1 :
Download Jquery from http://code.jquery.com/jquery-1.5.1.min.js
· Step 2 : Place
the the downloaded jquery-1.5.2.min.js in the same folder which
contains the HTML files
· Step 3 :
Include the jquery-1.5.2.min.js in the HTML code
<html>
<head>
<script src=“jquery-1.5.2.min.js
"></script>
</head>
<body>
some
content…..
</body>
</html>
$(document).ready
Function to execute when the DOM is fully
loaded.
$(document).ready(function() {
//
Handler for .ready() called.
});
Best
place to attach all other event handlers and run other jQuery code
No comments:
Post a Comment