Category: JavaScript

  • on() click()

    on() click()

    Today I learned the difference between the on(“click”) and click() methods in jQuery. click() only adds listeners for existing elements, so it will completely ignore any dynamically added items. So, in the example below only the <li> declared in the HTML file will be clickable. All of the new <li> elements added to the to-do…

  • VS Code

    VS Code

    Recent reading leads me to think my text editor of choice (Atom) might not be the best solution for my current needs. To that end, I’m downloading VS Code just to see what all the fuss is about. The number one thing I keep hearing about VS Code is its performance. I’ve always found this…

  • What is the state of JavaScript?

    What is the state of JavaScript?

    This JavaScript thing is really catching on eh? As the name suggests, “the state of JavaScript” survey gives a snapshot view of JavaScript development. What everyone (over 20,000 developers anyway) is using and enjoying or otherwise. It also gives a general sense of the direction things are going in. As with the StackOverflow survey, I found…

  • Pigs in namespaaaace

    Pigs in namespaaaace

    When you’re working on a JavaScript (JS) app you’ll create loads of functions and variables. By default in JS, there is no namespacing so everything you declare is effectively in the global namespace. This can lead to issues where two or more functions or variables can easily be called the same thing and create conflicts.…

  • Selection

    Selection

    One thing I notice about jQuery is how it simplifies common tasks. A good example is something you do all the time with JavaScript, select DOM elements. In JavaScript selecting all li elements would look something like this: The same selection using jQuery is like this: At this stage of my learning, I can’t say…

  • Survey says

    Survey says

    Today I was reading the 2018 stack overflow developer survey and boy was it an interesting read. There are loads of insights into the current state of software development. For example, JavaScript continues to grow in dominance. If you’re working on the web and you’re not learning JavaScript you need to start yesterday. It’s been…

  • Hex

    Hex

    Just a quick post to say I’ve updated the colour game with a new mode, Hex colours. To enable different modes I’ve changed a little bit of the UI. So the difficulty is now a dropdown making room for a matching mode dropdown. The beauty of this is I can add other modes (CMYK for…

  • Halfwa​​y

    Halfwa​​y

    Just now I’ve put the finishing touches on “The Great RGB Colour Game” thereby passing the halfway point of my web dev bootcamp. You can take a look at the code on GitHub. So far the course has covered HTML, CSS, Bootstrap 3 and 4, and my personal favourite so far, JavaScript. JavaScript really seems…