Search Results

Search found 1 results on 1 pages for 'user1691441'.

Page 1/1 | 1 

  • How to add ease to this, with jQuery Easing plugin.

    - by user1691441
    I've asked this question previously before, and had a bit of help, but my lack of jQuery skills still didn't accomplish the job. I was wondering if anyone else could help me out with this. I've tried adding easing: "easeIn" right after the duration section, but still didn't work for me. if anyone could help me out that would be wonderful. I'm using the jquery easing plugin $(function() { function scroll(direction) { var scroll, i, positions = [], here = $(window).scrollTop(), collection = $('.part'); collection.each(function() { positions.push(parseInt($(this).offset()['top'],10)); }); for(i = 0; i < positions.length; i++) { if (direction == 'next' && positions[i] > here) { scroll = collection.get(i); break; } if (direction == 'prev' && i > 0 && positions[i] >= here) { scroll = collection.get(i-1); break; } } if (scroll) { $.scrollTo(scroll, { duration: 350 }); } return false; } $("#next,#prev").click(function() { return scroll($(this).attr('id')); }); $(".scrolltoanchor").click(function() { $.scrollTo($($(this).attr("href")), { duration: 350 }); return false; }); });

    Read the article

1