Wednesday, 5 February 2014

How to Scroll Page Automatically by few pixels after every few seconds using JQuery

Hi friends,in this article i will explain about How to Scroll Page Automatically by few pixels after every few seconds using  JQuery .

I already explained in the previous articles about JQuery:Select Multiple records in GridView with Ctrl Key in ASP.NET using C#/VB.NET,TextBox AutoComplete using JQuery or JSON in ASP.NET,How to Validate Date in Different(Any) formats using C#.NET/VB.NET and VS Shortcuts | Shortcut keys for Visual Studio
In ASP.NET:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>How to Scroll Page Automatically by few pixels after every few seconds using
        JQuery </title>
    <script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.4.min.js">
    </script>
    <script type="text/javascript" language="javascript">
        $(document).ready(function () {
            setInterval(function () {
                var ScrollDir = $(window).scrollTop();
                ScrollDir = ScrollDir + 100; //set 100 as pixels to scroll
                $('html, body').animate({
                    scrollTop: ScrollDir
                }, 2000);   //10000 is speed of scroll
            }, 2000);     //1000 Shows,after how many seconds we want to scroll
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div> 
        <h4>
            How to Scroll Page Automatically by few pixels after every few seconds using jQuery</h4>
        <p>
            ASP.NET</p>
        <p>
            C#.NET</p>
        <p>
            SQL Server</p>
        <p>
            VB.NET</p>
        <p>
            MVC</p>
        <p>
            WCF</p>
        <p>
            WPF</p>
        <p>
            HTML</p>
        <p>
            XML</p>
        <p>
            JQuery</p>
        <p>
            JavaScript</p>
        <p>
            Web Services</p>
        <p>
            .NET</p>
        <p>
            Java</p>
        <p>
            PHP</p>
        <p>
            Ruby on Rails</p>
        <p>
            Oracle</p>
        <p>
            MSBI</p>
        <p>
            TeraData</p>
        <p>
            DataWareHouse</p>
        <p>
            Cloud Computing</p>
        <p>
            C</p>
        <p>
            C++</p>
        <p>
            DBA</p>
        <p>
            SAP</p>
              <p>
            ASP.NET</p>
        <p>
            C#.NET</p>
        <p>
            SQL Server</p>
        <p>
            VB.NET</p>
        <p>
            MVC</p>
        <p>
            WCF</p>
        <p>
            WPF</p>
        <p>
            HTML</p>
        <p>
            XML</p>
        <p>
            JQuery</p>
        <p>
            JavaScript</p>
        <p>
            Web Services</p>
        <p>
            .NET</p>
        <p>
            Java</p>
        <p>
            PHP</p>
        <p>
            Ruby on Rails</p>
        <p>
            Oracle</p>
        <p>
            MSBI</p>
        <p>
            TeraData</p>
        <p>
            DataWareHouse</p>
        <p>
            Cloud Computing</p>
        <p>
            C</p>
        <p>
            C++</p>
        <p>
            DBA</p>
        <p>
            SAP</p>
    </div>
    </form>
</body>
</html>

You can download the code by clicking on the below Download image. 



Live demo


"If you like my blog or articles, you can appreciate by leaving your comments or Liking my Facebook pageAspdotnet-kishore, following on Google+ Aspdotnet-Kishore, Twitter  on AspdotnetKishore, Linked in Aspdotnet-Kishore, stumbling my posts on stumble upon and subscribing on  RSSfeed Aspdotnet-Kishore for free updates directly to your Email inbox . Watch my blog  for more articles." 

No comments:

Post a Comment

© 2012-2014 Aspdotnet-Kishore.blogspot.com. All Rights Reserved.
The content is copyrighted to Kishore and may not be reproduced on other websites without permission from the owner.