CodePen

HTML

            
              <button id="respToggle">View Full Site</button>
<p>Responsive: <span class=respOn>On</span><span class=respOff>Off</span></p>

<h1>Heading will be red, if responsive, if width is less the 500px</h1>
            
          
!

↑ Insert the most common viewport meta tag

CSS

            
              .respOff {
  display: none;
}
.resp {
  .respOff { display: inline; }
  .respOn  { display: none; }
}

@media screen and (max-width: 400px) {
  .resp {
    h1 { 
      color: red;
    }
  }
}
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              !function() {
  var toggle = document.querySelector('#respToggle');
  
  toggle.onclick = function() {
    var classes = document.documentElement.classList;
    
    if (classes.contains('resp')) {
      classes.remove('resp');
    } else {
      classes.add('resp');
    }
  };
}();
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................