In this tutorial, you are going to learn the basic syntax of jQuery. The jQuery syntax is designed for selecting HTML elements to perform some action on the elements <tag/>.
Basic syntax:
$(selector).action();
- $ – defined or to access jQuery
- (selection)– fetching the HTML Elements.
- action() – performing HTML Elements.
Example:
$(this).show() - Displaying the hidden HTML elements. $("div").hide() - Hiding all <div></div> tags. $(".hide").hide() - Hiding all elements with class ="hide".
Take note:
jQuery codes must be written inside the document.ready function so that it will be executed when the document is ready.
$(document).ready(function() { codes must be written here... });
All variables can be declare outside this function.
For all students who need programmer for your thesis system or anyone who needs a sourcecode in any programming languages. You can contact me @ :
Email – [email protected]
Mobile No. – 09305235027 – tnt