Tuesday 15 March 2011

javascript - Easing href to div/section of website -



javascript - Easing href to div/section of website -

i not sure how mimic (http://ironsummitmedia.github.io/startbootstrap-agency/) website's easing. mean easing when click on websites navigation tabs, slide appropriate portion of section/div. think uses jquery ui easing (http://api.jqueryui.com/easings/). i'm not sure start start learning jquery , front end end development.

i think started,

class="lang-js prettyprint-override">$("#nav-pill").onclick(function() { // easing methods? })

you have syntax error in jquery

class="lang-js prettyprint-override">$("#nav-pill").on('click', function() { });

and next code makes accomplish smooth scrolling effect while

jquery code: $("#nav-pill").on('click', function() { var mode="easeinoutcirc"; // or select mode jquery easings $('html, body').animate({ scrolltop: $("#mydiv").offset().top }, 2000, mode); });

it should work fine case.

javascript jquery html jquery-ui frontend

No comments:

Post a Comment