Fix for jQuery UI 1.20

This did the job for me. Tested with jQuery 2.1.1 and jQuery YU 1.10