<script type="text/javascript">$(document).ready(function(){ $("a").on(\'click\', function(event) { if (this.hash !== "") { event.preventDefault(); var hash = this.hash; $(\'html, body\').animate({ scrollTop: $(hash).offset().top }, 500, function(){ window.location.hash = hash; }); } }); });</script>
<p>This plugin only <span id="lines">0</span> lines of code.</p> $('#lines').animateNumber({ number: 165 });