Tutorials

Events

You could just watch our video here.

Check out the codepen here

But, if you want some explanations, read below.

back to table of contents

short explanation

a website is an interactive experience. That is why, these days, we use the word app more and website less. In an app, just like in real life, everything is based around events.

When the alarm goes off, you wake up. The alarm event happens, and you react to it. Either you snooze it or you actually get up. Or, you might turn it off and go back to your sleep anyway.

In a web app, events are generated by DOM elements, the browser, javascript and so on. A lot of events get generated every time the web app is being used. As a programmer, it is up to you to listen to those events, the one you need, and write code to react to that.

<button id = "buttonsignin" class="btn btn-lg btn-primary btn-block" onclick="signin()" >

Here, the button is generating many events, and on of them is onclick. I have linked this event to a function called signin.

Anytime the web app user clicks on the button,the function signin is called.

Like this, you can choose to handle any and all events that are generated throughout your app.

important note

This code is provided as is without any warranties. It’s primarily meant for our own use. Feel free to use this code as it pleases you.

About

Owner and Developer of this project - Jay