Added the logic needed to make the delete modals work. This was likely a
change in jQuery at some point.