Javascript scroll to div -


i have 2 issues i'm wrestling @ moment. i'm trying use javascript jump id on page (i slow animation js gives). javascript using though isn't working though. here's js fiddle i'm working on:

http://jsfiddle.net/n6h8v/5/

here code(sorry long html, had use testing scrolling):

html:

<section id="thumbs-work">      <img id="top-cat" src="images/cat.png">          <p> /* large amount of text force scrolling */ </p> </section>       <div class="back-to-top back-to-top-left">         <p><a>         <span class="top-jump">back top</span><img src="images/cat.png" alt="back top"></a></p>     </div>  </div> 

javascript:

$( document ).ready(function() {         $(".top-jump").click(function() {                 $("html, body").animate({ scrolltop: $("#top-cat").offset().top }, 1000);                 return true;         }); }); 

any appreciated

it's because didn't load jquery in jsfiddle. it's in upper left, under frameworks & extensions.


Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -