Above this, `$this.toggleClass('invisible', !data.is_visible)` and you can remove the two lines below.