When the screen is on a certain width, we wish to hide a button and, instead, allow the wrapper div to be clickable.
That should only happen, however, when:
@media only screen and (min-width:320px) {
While we can easily display:none;
and display:block;
the button, the issue arrives when we want to remove the surrounding wrapper div (on higher screen sizes), because, if we display: none;
the surrounding div, all their inside content will be removed too!
Is there any javascript version of the media query above, that could be reliable cross browser, and cross OS, that one may have, in order to dynamically add and remove the element on certain screen conditions?