The external references in jsFiddle didn't list jQuery but it is needed. That was the only addition I had to make to get this functioning. Just add it before you add the
<script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
Note that you don't really need jQuery - just change the JS portion of this include to use native JS and it would work without jQuery.
Working recreation: http://codepen.io/staypuftman/pen/PGYJKB