Edit on
<article>
  <section id="part-one">
    <h1>CodePen Challenge</h1>
    <p>Hover over the title above. You’ll see a link appear. We want you to style that link! The markup for each title and link, just so you know, looks like this: 
    <pre>
    &lt;h1&gt;
      &lt;span&gt;Codepen Challenge&lt;/span&gt;
      &lt;a href="#part-one"&gt;#part-one&lt;/a&gt;
    &lt;/h1&gt;</pre></p>
  <p>Make sure you retain the <a href="https://codepen.io/tag/tutplus/">tutsplus</a> tag on your pen so we can identify it–good luck!</p>
  </section>
  <section id="part-two">
    <h1>Here’s another part of the article</h1>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Libero consequuntur, voluptatem ducimus eligendi corporis, expedita quidem suscipit beatae harum ab illum autem consectetur aliquid ullam rerum et debitis alias ipsam.</p>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Totam vero porro recusandae, minus possimus dolorum placeat quas nihil quod cumque ipsa ratione magni? Error autem repudiandae incidunt ducimus inventore velit?</p>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quisquam facere suscipit cumque, totam, nisi unde nobis, libero ipsum non ad nostrum eligendi! Saepe quidem beatae, cupiditate rem explicabo repellat. Nulla!</p>
  </section>
  <section id="part-three">
    <h1>Here’s yet one more</h1>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quo perferendis dicta voluptas adipisci ratione saepe facere hic deleniti illo ipsa iste cum, incidunt iure eum nobis aliquam, id quod porro.</p>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Recusandae blanditiis, expedita deserunt ipsam. Esse nostrum placeat culpa impedit harum, architecto at, inventore quidem aliquam natus nisi libero deleniti nesciunt expedita.</p>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsa nulla alias tempore ipsam odio ullam asperiores, eveniet repellat. Impedit laudantium in tempore veniam sed ratione ipsam sint tenetur nisi, officiis.</p>
  </section>
</article>
/* these are some base styles which you can ignore */
body{font:100%/1.5 sans-serif;color: #444;}article{width:90%;margin:0 auto;}pre{background: #f2f2f2;padding:1em 0;}

/* this is where we start styling.. make any changes you like! */

$cb: cubic-bezier(0,1.38,1,1);

h1 a {
  display: inline-block;
  vertical-align: middle;
  position: relative;
  padding: .5em .75em .5em .5em;
  margin-left: 1.5em;
  font-size: 50%;
  font-weight: normal;
  text-decoration: none;
  background-color: rgba(blue,.5);
  border-top-right-radius: .5em;
  border-bottom-right-radius: .5em;
  color: white;
  opacity: 0;
  transform-origin: left center;
  transform: scale(.25) translateX(-50%);
  transition: opacity .3s, transform .275s .25s ease, background-color .3s, border-color .3s;
  
  &::before {
    display: block;
    content: '';
    position: absolute;
    top: 0;
    right: auto;
    bottom: 0;
    left: -1em;
    height: 0;
    width: 0;
    border-right: 1em solid rgba(blue,.5);
    border-top: 1.25em solid transparent;
    border-bottom: 1.25em solid transparent;
    transition: inherit;
  }
}

h1:hover a {
  opacity: .5;
  transform: none;
  transition: opacity .15s .1s, transform .3s $cb, background-color .3s, border-color .3s;
  
  &:hover {
    background-color: rgba(blue, .75);
    &::before {
      border-right-color: rgba(blue, .75);
    }
  }
}
View Compiled
$('article section').each(function(i,el){
  var id = $(this).attr('id');
  var h1 = $(this).find('h1').first();
  var t = h1.text();
  h1.html("<span>" + t + "</span>");
  h1.append("<a href='#"+id+"'>#"+id+"</a>");
});
Rerun