Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <div class="text">
    Click the button below to show a gray screen and make a white modal come down from the top. You'll need to:
    <ul>
      <li>Add 2 CSS rulesets</li>
      <li>Fill in the jQuery</li>
      <li>Do one more thing</li>
    </ul>
    For extra credit, make the modal close button work.
    <br><br>
    (The one more thing is to include jQuery at the bottom of your HTML. :P)
    <br><br>
    <button class="show-it">Show me a modal!</button>
</div>
  
  
  <div class="screen">
  </div>
  <div class="modal">
      It doesn't matter what comes, fresh goes better in life, with Mentos fresh and full of Life!
    <br>
    <button class="close-it">Close</button>
   </div>
  
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
</body>
</html>
 
$('.show-it').click(function() {
 $('body').addClass('showModal');
});
$('.close-it').click(function() {
 $('body').removeClass('showModal');
});
Output

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

Dismiss x
public
Bin info
santheopro
0viewers