web analytics
Select Page

In my previous post, I talked about finding small projects to practice the concept you learned right away.

The next thing that needs to be done for skill acquisition is Simplify. 

When I learned jQuery for the first time, I watched all the videos from Code School, from the DOM Selector to AJAX concept. Because I was bombarding my brain with a lot of information, it muddled all the information together. In essence, I don’t know what jQuery is anymore.

Take a breather…

When I was learning jQuery from Thinkful, I was able to simplify the beginning aspect of jQuery – Select, Listen, and Action.

First you have to select which element you want to modify in your DOM. How you select an element can get tricky. I practiced a lot using the Chrome Dev Tools console to try select elements from a complex website.

After you select some DOM element[s] you want to work with, you listen for an event. This event is essentially the trigger. This can be a click event, hover from a mouse, keyboard press, and myriads of other things. But that’s all there is to it, listening to events. Don’t get confused with the hundred different types of events – just know that it is listening to some trigger.

Then when that an event is triggered, you will do the action. This action is defined in a function, and you can do whatever you want to the DOM. Maybe you want to add a class to the element, or you want to remove certain element – seriously, whatever you want.

Just remember to simplify in the beginning:

SELECT [bootstrap_icons code=”icon-arrow-right”] LISTEN [bootstrap_icons code=”icon-arrow-right”] ACT

Share This