CodePen

HTML

            
              <article>
    <h1>Heading 1</h1>

    <div class="buttons">
      <button>$75 Buy!</button>
      <button>PDF</button>
    </div>

    <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget,
    tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
  </article>

  <article>
    <h1>Heading 2</h1>

    <div class="buttons">
      <button>$75 Buy!</button><button>PDF</button>
    </div>

    <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget,
    tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
  </article>

  <article>
    <h1>Heading 3</h1>

    <div class="buttons">
      <button>$75 Buy!</button><button>PDF</button>
    </div>

    <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget,
    tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
  </article>

  <article>
    <h1>Heading 4</h1>

    <div class="buttons">
      <button>$75 Buy!</button><button>PDF</button>
    </div>

    <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget,
    tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
  </article>
            
          
!

↑ Insert the most common viewport meta tag

CSS

            
              article {
  width: 100%;
  margin: 0 auto;
  opacity: 0.8;
}

h1 {
  text-align: center;
  color: #e05f5a;
  margin-bottom: 0;
  font-size: 50px;
  cursor: pointer;
}

.buttons {
  display: none;
  margin-top: 5px;
  text-align: center;
}

p {
  display: none;
  color: white;
  padding: 10px;
  width: 35%;
  margin: 0 auto;
}
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              $(function(){
  var h1 = $("h1"); //Get all the h1's
  var article = $("article"); //Get the article
  var all = $("article>.buttons, article>p"); //Get all the buttons and the p elements
  
  h1.on("click", function(){ //when the user clicks any h1
    all.slideUp(600); //slide up (or remove) all the buttons and p elements
    h1.css("color", "#e05f5a"); //change the color of the h1's to default
    article.css("background", "white"); //change the article color to default
    
    $(this).css("color", "white").siblings(".buttons, p").slideDown(600).parents("article").css("background", "#e05f5a"); //change the current h1 to a white color; show the siblings (buttons and p elements) by sliding down; change the background of the article
  });
});
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................