I could not get the desired behavior from using ```@$('.popover').is(':visible')``` when handling the open/close events of the popover, so I captured the popover state in a view variable <code>@popover</code>.