David Walsh Tutorials

  • By
    CSS @supports

    Feature detection via JavaScript is a client side best practice and for all the right reasons, but unfortunately that same functionality hasn't been available within CSS.  What we end up doing is repeating the same properties multiple times with each browser prefix.  Yuck.  Another thing we...

  • By
    Get Pseudo-Element Properties with JavaScript

    CSS pseudo-elements are incredibly useful -- they allow us to create CSS triangles for tooltips and perform a number of other simple tasks while preventing the need for additional HTML elements.  To this point, these pseudo-element CSS properties have been unreachable by JavaScript but now...

  • By
    Firefox OS Source Leaked!!!

    The complete, commented source code for Mozilla's new Firefox OS effort has been leaked!!  In what can only be a massive oversight on Mozilla's part, the holy trinity of Firefox OS (codenamed Boot2Gecko), Gonk (the Linux kernel), Gecko (the renderer), and

  • By
    Convert arguments to Array

    The arguments object thats automatically available within functions can be a source of confusion for some people; it's kind of an array but it's kinda not. JavaScript is awesome in that you can pass any number of arguments to a function, and oftentimes developers need to...

  • By
    Detect Pseudo-Element Animation Support

    A while back I posted an interesting tidbit from Daniel Buchner which allows developers to detect DOM node insertions with JavaScript and CSS animations; an awesome trick driven by CSS animations.  Lea Verou recently posted another detection snippet driven by CSS animations:  detecting pseudo-element...

  • By
    Learn More, Faster with Treehouse

    My sponsor, Treehouse, has mastered teaching complex development concepts and techniques using the visual media; something not easy to do, and neither is learning anew technology from scratch without proper guidance.  Tutorials are nice but oftentimes make assumptions about current knowledge and don't tend...

  • By
    Get Element Attributes with JavaScript

    What I love so much about JavaScript is that the language is incredibly dynamic.  So dynamic that you can modify native objects if you so choose.  One dynamic property I've frequently been using lately is the attributes property of DOM elements.  This attributes property provides me...

  • By
    5 Common Usability Mistakes and Solutions For Avoiding Them

    I'm sort of a grumpy web user, but I think that's part of what drives me to be a good Web Developer.  I get so annoyed at things that make using a website difficult, things that should be basic.  Here's a list of five common usability...

  • By
    JavaScript Functions that Return Functions

    A few weeks back, I tweeted that I loved functions that returned functions. I got quite a few replies to the tune of....WTF?!  It's important that people understand the value of functions that return functions;  using this technique can save you code, JavaScript efficiency, and...

  • By
    Detect Vendor Prefix with JavaScript

    Regardless of our position on vendor prefixes, we have to live with them and occasionally use them to make things work.  These prefixes can be used in two formats:  the CSS format (-moz-, as in -moz-element) and the JS format (navigator.mozApps).  The awesome X-Tag project has...