Fix compatibility with jQuery 1.9.x
Merge pull request #52 from michaelperrin/bugfix/jquery-1.9

Fix compatibility with jQuery 1.9.x