Updated previous jQuery 1.9 fix to be more robust
Merge branch 'dev' into wip