Lydon’s Web Apps Blog


JQuery
July 14, 2008, 12:45 am
Filed under: Uncategorized

JQuery is quick and succinct. Javascript Library simplyfies how you navigate HTML documents and add AJAX interactions to your web pages.

Minify is the process of removing all unnecessary characters from source code, without changing its functionality.

$(document).ready(function(){ // Your code here });

The above code simply executes a function when the page has finished loading. The ready event checks the document and waits til it’s ready to be manipulated. JQuery declares its ready event in the function declaration. Javascript declares its onload event separate from the function.

Chainability is being able to apply methods to a set of elements. JQuery returns query objects itself, allowing you to “chain” apon it (as in applying methods to set elements or even adding and removing elements).

This is JQuery’s low-level AJAX implimentation. See$.get, $.post. for higher level abstractions that are often easier to understand and use, but don’t offer as much functionality (such as error callbacks). $.ajax() returns the XMLHttpRequest that it creates. In most cases you wont need that object to manipulate directly, but it is available if you need to abort the request manually. $.ajax() takes one arguement, an object of key/value pairs, that are used to initialized and handle the request.


No Comments Yet so far
Leave a comment



Leave a comment
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>