Category Archives: javascript

JS Bin has become essential to me

Something that has really helped me improve my workflow over the last year or so has been JS Bin. The ability to just test some small snippets of code without having to create a new file the leads to me … Continue reading

Posted in javascript | Leave a comment

Use Chrome’s Developer Tools to check for event listeners

I don’t know how long this feature has been in the Dev Tools but I know it’s something that I could have used a few times over the years. When you inspect an element hidden down in the corner underneath … Continue reading

Posted in javascript | Leave a comment

Using jQuery and JSON to display content

In my previous post I showed you how to get some data from a JSON file and then add to a web page using jQuery (if you haven’t read that one, you should read it first so this makes sense). … Continue reading

Posted in javascript | Tagged , , | 1 Comment

Getting Started with jQuery and JSON

If you’re passed to absolute beginner stage of learning JavaScript, I’m sure that you’ve at least of of JSON, even if you don’t know exactly what it is. JSON, or JavaScript Object Notation, is pretty much a JavaScript based alternative … Continue reading

Posted in javascript | Tagged , , | 1 Comment

It took me a bit to figure out the right way of handling events in JavaScript

When I first started to learn JavaScript in school, one of the things that I found confusing is that there’s a hundred ways to do everything. And to make it even more confusing, there’s a hundred people that will tell … Continue reading

Posted in javascript | Tagged , | 1 Comment

Using JavaScript to get CSS values of pseudo elements

If you want to get the CSS property value of any element using JavaScript, you use window.getComputedStyle. This gives you the final value after the page is rendered. So if you wanted to get the width of a div, you’d … Continue reading

Posted in javascript | Tagged | Leave a comment

Client side form validation with JavaScript that even works in IE8

I’m a big fan of client side validation because, a) I’m a front-end guy and b) since I use Ajax to send the content to the server, I don’t really want to go to the trouble of checking it on … Continue reading

Posted in javascript | Tagged , | 1 Comment

Create private variables in JavaScript using closures

When you’re coming from other programming languages to JavaScript one of the things you can find frustrating is the lack of private variables. I know, coming from ActionScript to JavaScript, I was finding myself accidentally overwriting a variable and breaking … Continue reading

Posted in javascript | Tagged , | 1 Comment

Using conditionals and helpers with Handlebars.js

Last time, we looked at how we can use a JavaScript template, in our case Handlebars.js, to swap out content. But what if we have some content that isn’t going to appear in each of our content blocks? Continuing with … Continue reading

Posted in javascript | Tagged , , | Leave a comment

Use JavaScript templates to swap content

In my previous example of using a JavaScript template, I showed you how to use it to set up some static content. While that’s a good use for JS templates, you can use it to do a lot more. One … Continue reading

Posted in javascript | Tagged , , | 1 Comment