Adding solution to support jQuery 1.8 from @zackpudil in issue #5