User Tools

Site Tools


programming:jquery

jQuery Mobile

Slow scrolling href

<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>

Animate Number

<p>This plugin only <span id="lines">0</span> lines of code.</p>

$('#lines').animateNumber({ number: 165 });
programming/jquery.txt · Last modified: 2018/03/06 00:48 by Jan Forman