Chaining jQuery Ajax Calls

Starting with version 1.5, jQuery has provided Deferred Objects to make working with asynchronous functions a little easier. A canonical example of its usage might be: $.getJSON('/dataz').then(function(objects) { alert('I got some json data: ' + objects.length); });$.getJSON('/dataz').then(function(objects) { alert('I got some json data: ' + objects.length); }); I was recently working on some code that […]

Getting Started with jQuery Mobile

jQuery to the rescue again! jQuery Mobile is built on jQuery and helps ease work on mobile based web applications. The framework gives a great start to a mobile site with very little effort making a custom mobile interface. The examples below are also found on github. jQuery Mobile Basics The files needed to build […]

Simple Grid jQuery Plugin

Simple Grid is a jQuery plugin intended to be a no-fuss way to “replicate” your Photoshop grid on top of your development site. Download @ GitHub Set these 3 variables to get started: rowHeight This is your line-height (most of the time) columnWidth This is your column width – it’s BEST to use a number […]

Fast(er) CSS Selector Based Element Lookups in WatiN via jQuery

We’re using SpecFlow and WatiN to automate acceptance-level tests for a new ASP.NET MVC 2 web application. As we write more and more high-level system tests, we find ourselves wishing we had the ability to search our DOM using CSS selectors and other cool jQuery tricks. Eventually it dawned on us: why not actually use […]

Printing Textareas

On my current project, we are working on a feature to allow printing of reports. Every question in the report uses a textarea for comments. We ran into an interesting issue when comments overflow the textarea and cause it to scroll. When the report is printed, the textarea cuts off the part of the comment. […]