jQuery syntax is quite simple. Below is how we perform some action using jQuery –
- $ sign is used to access jQuery
- selector is specified as #div or .class or #div .class or #div .class h1
- action is the inbuilt jQuery functions like hide(), show(), etc.
All the jQuery methods must be present within its document-ready event block, to make sure that none of the jQuery code executes before the page has fully loaded.