Monday , 20 November 2017
Home / Tag Archives: object (page 2)

Tag Archives: object

Creating JSON Data – JSON Tutorial

Creating JSON Data

So, let’s get started with creating JSON data. Before we do, let’s set up our files and folders. Create a file called index.html and a folder called js. Inside your js folder, create a file called script.js. Inside your index.html add this bit of code. [crayon-5a123ca392740882831845/] Nothing special going on here besides including our script. So, let’s get started! Open …

Read More »

What is JSON? – JSON Tutorial

what is json

You’ve probably heard of JSON, but what is JSON? JSON stands for JavaScript Object Notation. It’s not a programming language. It’s not a markup language. It’s a lightweight text-data interchange format. So, what does that mean? To put it simply, it’s a file with data formatted to be readable by other programming languages. JSON by itself doesn’t really do anything. …

Read More »

Events – JavaScript Tutorial

Events

One of the more powerful features in JavaScript are events. By default, there are a couple of events you have access to thanks to the HTML DOM. Let’s learn a couple of these events. Unobtrusive JavaScript I’ve talked about this before, but to refresh your memory I’ll say it again. Some events can be used directly inside HTML elements. While …

Read More »

Change CSS – JavaScript Tutorial

Change CSS

JavaScript not only allows you to change the HTML in your document, but you can also change the styles of a certain element. The procedure to change CSS is straightforward. Let’s look at how to do this. Updating the HTML Update the <body> tags in your HTML document to this. [crayon-5a123ca394b0f490681414/] Next, let’s clear your script and add this bit …

Read More »

Change HTML Attributes – JavaScript Tutorial

Change HTML Attributes

We learned how to change the HTML inside elements. What if we wanted to the change the HTML attributes? This is very easy to do. First, update the <body> tags inside your HTML document to this. [crayon-5a123ca3958f7751677995/] What we’re going to do is grab the anchor tag’s link and change it with another link. Now that our HTML document is …

Read More »

HTML DOM – JavaScript Tutorial

HTML DOM

We’re finished with talking about object oriented programming in JavaScript for now. We’re going to talk about the HTML DOM. As I stated in the first tutorial, you should have a good understanding of HTML and CSS. If not, then go learn HTML and CSS. These next couple of tutorials depend on that knowledge. What is the HTML DOM? DOM …

Read More »

Prototypes – JavaScript Tutorial

Prototypes

Prototypes in JavaScript can get very complex. There’s a lot to go over. In this tutorial, we’ll only talk about the basics and it’s use for creating methods or properties after the creation of the object. Whenever you drive a car, the amount of mileage goes up. So, let’s create a property that will hold the mileage and create a …

Read More »

Creating Objects – JavaScript Tutorial

Creating Objects

Object oriented programming is a style of programming. JavaScript will read your code from top to bottom and execute it in that order. This is what’s called procedural code. Object oriented programming doesn’t work this way. Instead, it’s built on the concept of “objects”. For the most part, object oriented programming is viable for advance or large projects. It helps …

Read More »

Math Object – JavaScript Tutorial

Math Object

The math object is another object you’ll find yourself using often. It allows you to perform advance math operations. It can really save you time and you don’t have to write as much code. Math Object Properties Let’s get started. Clear your script and add this bit of code. [crayon-5a123ca398289155835331/] You do not have to create an instance of the …

Read More »

Date Object – JavaScript Tutorial

Date Object

The date object is a very special object. It allows you to grab the current time and date. It also allows you to manipulate the time and date easily. Let’s take a look at how useful the date object can be. In order to use the date object, you have to store the instance of the object inside a variable. …

Read More »
ULTIMATE WORDPRESS DEVELOPMENT COURSE
Want to learn how to create your own custom WordPress plugins and themes? Check out my course!
Get 93% off my course. You'll also learn how to integrate WooCommerce and BuddyPress into your projects. This is a limited time offer
Yes, I would like to get 93% off your course!
No Thanks!
close-link