Update popover code to work properly with Turbolinks