Only toggle visibility when in html5 mode