JavaScript Tutorials

  • By
    Camera and Video Control with HTML5

    Client-side APIs on mobile and desktop devices are quickly providing the same APIs.  Of course our mobile devices got access to some of these APIs first, but those APIs are slowly making their way to the desktop.  One of those APIs is the getUserMedia API...

  • By
    Multi-Line JavaScript Strings

    The JavaScript language performs automatic semicolon insertion at the end lines, so creating multiline strings usually ends up looking something like this: String upon string of concatenated JavaScript mess...ugly, slow, and ...ugly.  Many novice JavaScript developers don't know that there's a better way to create multiline strings: Adding...

  • By
    Interview with John Hann, Creator of curl.js

    Hello John! For those who don't know you, give us a quick introduction and let us know what you're working on. Hi, I'm John. John Hann. "@unscriptable" on most of the interwebs. I've been writing Javascript since 1995. Like many, I wasn't...

  • By
    Move Caret to End of Input or Textarea

    One of the annoying parts of using the focus method of HTML elements is that they don't move the cursor to the end of INPUT or TEXTAREA elements if they already have content in them.  That's probably the last thing a user would want.  I was...

  • By
    Build IRC Bots with Node.js

    One of the tasks on my WebDev bucket list has always been creating a functional IRC bot.  I have no clue why it's been high on my list, but ... it just has.  IRC bots are used for a variety of things:  Google search, keyword detection...

  • By
    Rolling Your Own RSS Feed with Express and Jade

    RSS feeds are a great way to facilitate a loyal readership. In fact, as I write this, the RSS feed in David's sidebar is touting over 11,400 subscribers. Hitting the front page of Hacker News is always nice, but for most sites that's not...

  • By
    Game Configuration with JSON

    The Scenario For the past month or so, I've been spending some time making web games using Node and Express. One thing I wanted to do was reduce reliance on content management via database, where the typical process is the following: Log into the site Validate that I have...

  • By
    How Cobalt Calibur Uses Canvas to Display Sprite-Based Graphics

    Hi, I'm Thomas Hunter, creator of Cobalt Calibur, an HTML5 multiplayer game. I'm here to tell you about how I used the new HTML5 canvas API to provide visuals using sprite-based graphics. This is similar to how old game consoles such as the NES...

  • By
    Modal-Style Text Selection with Fokus

    Every once in a while I find a tiny JavaScript library that does something very specific, very well.  My latest find, Fokus, is a utility that listens for text selection within the page, and when such an event occurs, shows a beautiful modal dialog in...

  • By
    5 HTML5 APIs You Didn’t Know Existed

    When you say or read "HTML5", you half expect exotic dancers and unicorns to walk into the room to the tune of "I'm Sexy and I Know It."  Can you blame us though?  We watched the fundamental APIs stagnate for so long that a basic feature...