October 2016
Intermediate to advanced
320 pages
6h 39m
English
The best way to get acquainted with event loop is through a popular library in the JavaScript world, that is, jQuery.
If you have experience working with jQuery, you can simply create (or chain) events to a simple DOM selector and then write code to handle those specific events. For example, you could create an onClick event by attaching it to a specific link and then code what will happen when that link is clicked.
If you're familiar with jQuery, the code to control a link that has the ID someLink would look something like the following:
HTML:
< a href="some url" id="someLink">
JavaScript:
$("#someLink").on('click', function() {
//some code here
});
In the preceding code snippet, every time jQuery finds an ...
Read now
Unlock full access