Data

The data tag is the most influential bit of sno code you will write in any project.
The data tag allows you to declare the variables of your project to use in your global body tag.
  1. The data tag always goes on the body element of your html file
  2. The actuall data tag uses single/double quotes with curly braces inside data='{}'

<body data='{count:0}'>


Alright! You've got the basics of the Data attribute, maybe try making your own variable!

The Breakdown

The data tag is secretly converted into a basic JS Object.
This lets the parser interact and watch for variable updates.
  This means the user can read the value of any variable by calling data.varName
  You can also modify a variable in your own JS by calling $("varName++");

[Prev] [Next]