Fix for new versions with jQuery