Tuesday , 18 June 2019
Home / Tag Archives: api

Tag Archives: api

Path API – Advanced JavaScript Tutorial

Path API

The path API allows you draw custom shapes with paths.  You can create some really complex shapes and drawings with this API as it comes with powerful methods. Lines Clear your script and add this bit of code. [crayon-5d091b0948444651675442/] So, we first set up the stroke color and set it’s with to 2 pixels. Now, we can start drawing some …

Read More »

Data Attribute – Advanced JavaScript Tutorial

Data Attribute

HTML5 is fairly new and it’s slowly being adopted by all web browsers today. A special feature of HTML5 is the ability to define custom data attributes. A data attribute is your own attribute that can contain information about an element. Let’s update our document to this. [crayon-5d091b0949b3b273801240/] To create a data attribute, you simply create an attribute with the …

Read More »

Selectors API – Advanced JavaScript Tutorial

Selectors API

The selectors API is a simpler way to grab elements by using CSS queries. If you recall, you can change the styles of an element using CSS. Here’s an example of how you would do so. [crayon-5d091b094a5d7457327340/] To grab an element in general, you just type in the tag name. To grab an element with an ID, you type a …

Read More »