Skip to content

Instantly share code, notes, and snippets.

@bahia0019
Created July 9, 2018 19:29
Show Gist options
  • Save bahia0019/a6244650abdec70efb18899353fab343 to your computer and use it in GitHub Desktop.
Save bahia0019/a6244650abdec70efb18899353fab343 to your computer and use it in GitHub Desktop.
const mobileHideVideo = function(){
const video = document.querySelector( '.div-of-video-element' );
video.remove();
}
if (window.screen.width < 768) {
mobileHideVideo();
}
@bahia0019
Copy link
Author

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(); }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment