jQuery actually makes it easier for you to develop your web pages. Most of what you will initially do with jQuery is access elements within your page and apply the desired effects.
jQuery Syntax
jQuery syntax is simple to use and understand. We can easily select HTML elements and perform an action on the elements. The basic syntax is $(selector).action(). You start with a dollar sign $. The dollar sign is used to define the code as jQuery. Next, define a selector to locate the target element(s). Finally, perform an action. Here are some examples of how to select elements. Here is an example of how to place text within a div element:
Docment.Ready Function
It is a good practice to wait for the document to be fully loaded and ready, prior to allowing your jQuery code to be useable. One of the first things you should learn about jQuery is the ready event. Most of your jQuery code will be contained within this handler. This will ensure that the jQuery code does not run until the DOM is ready. It will confirm that any element being accessed is already loaded and accessible, so the script will not return any errors related to missing elements. In addition, it also ensures that your code is unobtrusive.