Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
<style type="text/css">
  
  body{margin:0;}
  
  .css{
    display:none;
  }
  
  @media (min-width:768px){
    .css{
      display:block;
    }
  }
</style>
</head>
<body>
<div class="jq"></div>
<div class="css">This is CSS</div>
  
<script>
  $(window).on('load resize', function(){
    $('.jq').text($('body').innerWidth());
    if($('body').innerWidth() < 768){
      $('.jq').css({display: 'none'});
    }else{
      $('.jq').css({display: 'block'});
    }
  });
</script>
  
</body>
</html>
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
roXonpro
0viewers