Results for ""


    • Kyle

      Run once

      Taken from "There are times when you prefer a given functionality only happen once, similar to the way you'd use an onload event... ...The once function ensures a given function can only be called once, thus preventing duplic...

      Tags: examples, runonce,

      • Kyle

        Get absolute URL

        Taken from "Getting an absolute URL from a variable string isn't as easy as you think. There's the URL constructor but it can act up if you don't provide the required arguments (which sometimes you can't). Here...

        Tags: examples, URL,

        • Kyle

          Applying styles to selectors - insertRule()

          Taken from "...we can grab a NodeList from a selector (via document.querySelectorAll) and give each of them a style, but what's more efficient is setting that style to a selector (like you do in a stylesheet)... This is espec...

          Tags: examples, CSS,

          • Kyle


            Taken from "...sometimes you don't get to plug into an event to signify a desired state -- if the event doesn't exist, you need to check for your desired state at intervals. Polling has long been useful on the web and wil...

            Tags: examples, polling,

            • Kyle


              Taken from "The debounce function can be a game-changer when it comes to event-fueled performance. If you aren't using a debouncing function with a scroll, resize, key* event, you're probably doing it wrong. Here's a ...

              Tags: examples, debounce,