Compatibility fix for jQuery 1.10
Fixed #807