Skip to content

Instantly share code, notes, and snippets.

@mapsam
Created February 25, 2014 23:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mapsam/9220025 to your computer and use it in GitHub Desktop.
Save mapsam/9220025 to your computer and use it in GitHub Desktop.
A Pen by Sam Matthews.
<ul>
<li class="current">about</li>
<li>work</li>
<li>contact</li>
</ul>
$('ul li').click(function() {
$('.current').removeClass('current');
$(this).addClass('current');
});
ul {
li {
display:inline;
background-color:#e5e5e5;
padding:20px 30px;
position:relative;
&:hover {
background-color:#c0c0c0;
cursor:pointer;
&:after {
border-top:#c0c0c0;
}
}
&.current {
&:after {
width: 0;
height: 0;
border-left: 15px solid transparent;
border-right: 15px solid transparent;
border-top: 15px solid #e5e5e5;
content: " ";
position: absolute;
bottom: -15px;
left: 35%;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment