JavaScript Tutorials
Write Better JavaScript with Promises
You've probably heard the talk around the water cooler about how promises are the future. All of the cool kids are using them, but you don't see what makes them so special. Can't you just use a callback? What's the big deal? In this article, we'll...
Track JavaScript Errors with Google Analytics
Google Analytics has always been more than a hit counter and demographic tool -- you could build a career out of being a Google Analytics analyst. You can measure ad campaign effectiveness, track how far into a desired page flow (think advertisement to cart to checkout)...
Google Analytics Debugging with ga_debug.js
Google Analytics and its API is a beacon of awesomeness and immense stat tracking power, but for the longest time I was using some of its features, like event tracking, and simply taking Google's word for it that things were working correctly. Of course none of...
Lazy Load Resources Based on Element Presence
Fans of AMD JavaScript will probably tell you that they love loading only what they need, when they need them. I am one of those people. Let's take a site like mine for example: some pages require a syntax highlighter, some do not. Why make the...
Command + Enter to Submit Forms
I've used Mac's for about six years now but it wasn't until I started using Tweetdeck that I realized how awesome the
[COMMAND]+[ENTER]
key combination was. Inside a textarea? No problem --[COMMAND]+[ENTER]
and the form is submitted. What if all forms could be that way? They...Get the Focused Element with JavaScript
Ensuring that a website or web app is both accessible and usable, as well as functional, is paramount to a positive user experience for all users. Users don't appreciate when we've done a good job, but they definitely know when we've done poorly. One important part...
Disable the User’s JavaScript Console
There are a few giant companies out there, namely Facebook and Netflix, who have decided to effectively disable a user's ability to execute JavaScript console commands. The decision was initially made by Facebook to prevent users from executing a specific set of commands which...
new Function()
Douglas Crockford once said that JavaScript was the only language developers didn't need to learn to use. That's as true a statement as you'll hear when it comes to programming. We all sort of stumbled into JavaScript, mostly due to JavaScript frameworks which made JavaScript magical...
DO NOT TRIGGER REAL EVENT NAMES WITH JQUERY!
Sometimes JavaScript toolkits give us so much functionality that we can get hung by it if we're not careful. The more functionality that we use within a toolkit, the more opportunity there is to have one set of changes or additions affect another. That's especially true...
Startup Framework: Website Builder, Bootstrap Themes and More
One conclusion that I've come to when evaluating my skills is that I'm not a designer. Each time I redesign this blog, I identify a few sites I like and then meld them together. Of course that means I end up with UI components that...