Tag Archives: javascript

Build a game using the DOM – Part 2

In part two of building our game, we’re going to give our blue block or ship the ability to shoot lasers. But first we have to make a couple of changes in our code from part one in order to … Continue reading

Posted in javascript | Tagged , , | Leave a comment

Get the style property’s value of an element using JavaScript

Here’s a quick one. Let’s say you need to get a style property value using JavaScript, it’s actually not that complicated. But, of course, in true JavaScript fashion, the names of the methods are a bit clunky. First we have … Continue reading

Posted in javascript | Tagged | Leave a comment

Build a game using the DOM – Part 1

When I first became interested in building games using the browser and not Flash, I saw the examples people had made using HTML5’s canvas element so I started learning to build things with that. But every once in a while … Continue reading

Posted in javascript | Tagged , , | 2 Comments

Even with a name only an engineer could come up with, querySelectorAll() is pretty awesome

One of the reasons I put up tutorials and code on this site is because if something is wrong, someone will let me know, usually within an hour or two of me posting it. I’m actually really happy with how … Continue reading

Posted in javascript | Tagged , | Leave a comment

Recreate the 3D slider effect from the Android home page

I think I’ve mentioned on here before that once in a while I’ll see an effect on a web page and I’ll become obsessed with how it was down. The latest thing to catch my attention is the 3D slide … Continue reading

Posted in HTML/CSS | Tagged , | Leave a comment

getElementsByClassName might not work the way you think it does

I think a large amount of web designers and developers are like me, they start out using jQuery and then move to coding more with pure JavaScript. I’m not saying one or the other is better, although I’ve come to … Continue reading

Posted in javascript | Tagged , | 3 Comments

Working with CSS3 can be fun but it can also be amazingly frustrating

I recently decided to redesign my site and the main CSS3 effect I want to use works great in Webkit browsers but not so much in Firefox, at least not yet. I know you’re thinking, wait, what about Opera or … Continue reading

Posted in general | Tagged , | Leave a comment

Stuff they don’t tell JavaScript noobs: Making your arguments optional

One thing that took me a while to grasp fully when it came to programming was passing arguments to functions. I don’t know why but it was one of those things that I just got one day. But something that … Continue reading

Posted in javascript | Tagged , , | 3 Comments

Draw a rectangle using the mouse on the canvas in less than 40 lines of JavaScript

One thing that is a lot easier than people think is using the mouse to interact with the canvas tag. To show how easy, I wrote some code that allows a user to draw a rectangle on the canvas. This … Continue reading

Posted in javascript | Tagged , , | 1 Comment

Stuff they don’t tell JavaScript noobs: Convert a string into a variable name

Hey, I said this might turn into a series and it’s turned into a series of two! Last week, I put up a post about creating something you’d usually use jQuery to write using pure JavaScript. And as usual, I … Continue reading

Posted in javascript | Tagged , , | Leave a comment