Change put to patch
Fix JQuery events