updated popover javascript