Showing posts with label Introduction. Show all posts
Showing posts with label Introduction. Show all posts

Wednesday, 18 September 2013

$( document ).ready() - The first thing in jQuery

Hi Everyone, The first thing to learn about jQuery is $( document ).ready(): If you want an event to work on your page , you should call it inside the $(document).ready() function.

Diff between $( window ).load() and $(document).ready()

$( document ).ready() will only load once the page Document Object Model (DOM) is ready for JavaScript code to execute and before the page contents are loaded.

$( window ).load(function() { ... }) will run once the entire page (images or iframes), not just the DOM, is ready.
1
2
3
$( document ).ready(function() {
    console.log( "DOM is ready!" );
})

Tuesday, 17 September 2013

jQuery - "DO MORE" by "WRITE LESS"

This is the first post of the new jQuery Tut & Example series, walking you through the process of learning the hugely popular JavaScript library jQuery from scratch. This will lead us on to doing much cooler stuff with the library. 

Note: Folks who don’t have knowledge on HTML and CSS, I suggest you learn those before coming back to this.

What is jQuery?

jQuery is a "DO MORE" by "WRITE LESS" JavaScript library. This lightweight library simplifies javascript programming. jQuery contanins range of actions (Web Devlopment) such as Event handling, HTML document traversing, CSS manipulation, Animation & Effects and Ajax. The ultimate goal of jQuery, to make javascript more accessible for the less ‘Hardcore’ developer. jQuery is a lightweight, "write less, do more", JavaScript library.