Fixes #26

The problem was the .is(:visible) check. Hiding the element (which adds display: none) solves this.