Created
July 9, 2018 19:29
-
-
Save bahia0019/a6244650abdec70efb18899353fab343 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mobileHideVideo = function(){ | |
const video = document.querySelector( '.div-of-video-element' ); | |
video.remove(); | |
} | |
if (window.screen.width < 768) { | |
mobileHideVideo(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you want to just test it you can go super simple like this. But for production, it's probably more secure to do the original method.
if (window.screen.width < 768) { document.querySelector( '.div-of-video-element' ).remove(); }