Basic syntax is: $(selector).action()
- A $ sign to define/access jQuery
- A (selector) to “query (or find)” HTML elements
- A jQuery action() to be performed on the element(s)
jQuery Document.Ready
You might have noticed that all jQuery methods in our examples, are inside a document ready event:
$(document).ready(function(){
// jQuery methods go here...
});
$(function(){
// jQuery methods go here...
});
Tags: document.ready, jquery events, jquery selectors, jquery, jquery code snippets