Module 6 - Lesson 2

jQuery Syntax

In this lesson, I will give you an overview of the basic jQuery syntax, which is very simple and uses some elements directly from CSS, which makes it even easier to use.

Video Chapters

00:00 Introduction

00:40 HTML structure overview

02:47 document.ready event

04:31 jQuery syntax

05:43 Example - hide()

06:47 Example - fadeOut()

07:08 Example - css()

07:43 Example - click()

jQuery document.ready function syntax:
jQuery(document).ready(function($){

	// your jQuery goes here

});
Shorthand version:
$(function () {

	// your jQuery goes here

});
Sample jQuery functions:
$('#box').hide();

$('.circle').fadeOut();	

$('h1').css('color','red');
	
$('button').click(function(){
	$('.circle').fadeOut(1000);	
});

Join the discussion

Share your thoughts about this lesson with fellow students!

Login to your Account

If you're a DSA Student, please log in to your account to access the course content.

Sorry, you don't have access to this content.

It looks like you're not enrolled in Divi Stylist Academy.