For programmers, testers and tech geeks

JQuery, make html pages scroll-able

Recently worked on a solution to show a particular section/div of the page when click some link provided in a post and developed these lines that makes this happening:
$(function () {
       function scrolView(i) {
           $('div').each(function () {
               if (($(this).attr('id'))==i) {
                   $('html, body').animate({
                       scrollTop: $(this).offset().top
                   }, 1000);
               }
           });
       }
       scrolView('1');
   });
That is it, use above lines and make your pages scroll-able.