Author Archives: Mike
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
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
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
I really hope the future of the web is on my TV and not my phone
I’m going to be honest with you, I hate browsing the web on my phone. I check Twitter on it, I check my email, the weather and Wikipedia but i never actually surf the web on it. And it’s not … Continue reading
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
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
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
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
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
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