The Ultimate Guide to Writing jQuery Plugins

I have written a few articles about jQuery Plugin Development in the past which readers seem to have been interested in, but I have since then written many more plugins and have thus picked up a few more tips and tricks. I have therefore decided to put together this more comprehensive guide on jQuery Plugin Development.

I also want to note the importance of knowing how to develop jQuery plugins well as I find myself building many little custom plugins for my sites making it much easier to maintain not to mention reuse in other projects. Anything from little pagination and nav loaders to larger handlers for many of my ajax requests. When using in conjunction with a client side framework like Backbone.js you can really develop some nice modular code and keep frameworks like Backbone doing what they do best, controlling the logical flow of your website. Continue reading
Posted in jQuery | 3 Comments

10 Awesome Free jQuery Tooltip Plugins

It seems jQuery tooltip plugins have become the “Hello World” of jQuery plugin development with more tooltip plugins out there than one cares to keep track of. I spent a lot of time looking for tooltip plugins to use on my own site have put this list together as the top ten tooltip plugins that not only look great but are also easy to work with and modify should we need to. Continue reading
Posted in jQuery | Leave a comment

Two Reasons a Project Will Keep You Motivated

I recently came across this post on HN about a little chrome plugin you can use to block your internet access until you are done writing some code. It’s very true that the internet can be an easy distraction when trying to get some work done and the little plugin is a nice little tool to assist with that. When I really want to focus on something I typically turn off all my instant messengers, put my phone on silent flip it over and start hacking.

However, I got to thinking about what kind of projects keep me motivated, I find there are two reasons I’m generally motivated to work on any project:

1. Genuine enthusiasm to see the product/service/app work.
2. Learning something new. Continue reading
Posted in Articles | Leave a comment

How to Design a REST API and Why You Should

I have spent the last year or so learning and implementing backbone.js, REST and API development (among other things). They have really grown on me and have greatly simplified my life not only as a developer but as a team lead. It’s like when you went from no cell phone to a crappy little flip phone and then from that crappy little flip phone to a smart phone. Although you might trade your Android phone in for an iPhone and vice versa there is just no going back. It’s the same with backbone.js and REST.

I decided to write this article because I would never build another web service/app without first creating an API right off the bat. Even if the API is not public and 100% internal, it serves as a very powerful guiding piece for your entire application development and management. The truth is, it’s not a very difficult concept and for the most part it’s just a reshuffling of a lot of ideas you already know and understand about web development. My goal is to give anyone interested a solid starting point from which to move forward with and start implementing immediately. Continue reading
Posted in Web Services | 2 Comments

How to Write an Accurate Game Timer in JavaScript

How to Write an Accurate Game Timer in JavaScriptThis week I decided to revisit a game I had made a long time ago using HTML5 canvas called Blocknik, a Tetris style game I made to learn some HTML5 and how to use canvas. A buddy of mine wanted to get it into the app store for the iPad so I did a little overhaul of it, specifically with the timer.

Originally when I had written it I used what made the most sense to me at the time, basically you set your frame rate (30fps), divide that by 1000 milliseconds for one second and you get your interval between game loops, approximately 33.33 milliseconds. Continue reading
Posted in JavaScript | 1 Comment

jQuery Max Character Counter Plugin

jQuery Max Character Counter This little plugin was originally designed to limit the amount of characters that can be typed into the textarea element which does not support the maxlength attribute like an input element does. With HTML5 this is no longer required as they have finally added this attribute but until the rest of the world catches up I find myself still using this quite frequently as a backup. Actually in many cases I prefer to use it over setting the maxlength attribute as it’s easier to change if I have a large set of inputs. Continue reading
Posted in jQuery | Leave a comment

HTML5 jQuery Paint Plugin

Websanova HTML5 jQuery Paint Plugin Websanova Paint is a HTML5 canvas based jQuery plugin. It allows you to free paint on a canvas area with various shapes and colors including an eraser. It also features the fantastic Websanova Color Picker allowing you to set both border and fill colors. The canvas area can be set to any size you like and perhaps it’s greatest feature is the ability to save your drawing as an image and then load it back in later. In fact you can load any image in as your drawing as long as it is a base64 encoded PNG image. Continue reading
Posted in HTML5, jQuery | 3 Comments

How to Write Your Own JSFiddle (In 15 Minutes or Less)

This weekend I decided to build my own version of JSFiddle, a small little web service that allows you to test and share HTML, CSS and JavaScript code. It’s actually quite simple to write and only requires a few lines of code. The rest is pretty much eye candy and convenience for the user which JSFiddle has done a great job of. Since I like to write plugins I have turned my little experiment into a jQuery plugin called JSNova. It’s only functionality is to output results and reset the boxes but it’s quite fluid and you can pop it into your own projects. Continue reading
Posted in JavaScript, jQuery | 3 Comments

Loading jQuery From Google With Graceful Fallback

Loading jQuery From Google With Graceful Fallback This is a little example of how to load jQuery from Googles CDN. I prefer to load it from there as it’s nicely minified and g-zipped as well there is a better chance a user would have already picked up this file from another site so it will already be cached. This can improve the loading time of your site and every little bit helps. We also provide a fallback in case Google decides to crash for whatever reason. Continue reading
Posted in jQuery, jQuery Tips | Leave a comment

Why JavaScript For In Loops Are Bad

I recently wrote an article called Extending JavaScript – The Right Way which brought up some interesting points about JavaScript and how it’s prototyping model works. However there was a piece I missed about the use of for loops in JavaScript and how they are basically not a good idea to use and should be avoided as much as possible. I wanted to write a follow up piece to that article explaining the difference between using a regular for loop and a for in loop as I have received a lot of great feedback from the community. Continue reading
Posted in JavaScript | 1 Comment