Skip to content Skip to sidebar Skip to footer

Jump Scroll With Redirect To Another Page Of Same Blog On Blogger

I have a blog. i want to do if some one click on specific link. he should be jump scroll at specific point on same page. and then after some sec he should be auto redirect on other

Solution 1:

functionpageScroll() {
    window.scrollBy(0,50); // horizontal and vertical scroll increments
    scrolldelay = setTimeout('pageScroll()',100); // scrolls every 100 milliseconds
}

To being scrolling automatically when the page loads, add the following code to the body tag:

<bodyonLoad="pageScroll()">

The link is Like:

<ahref="javascript:pageScroll()">Scroll Page</a>

Scroll Directly to a Particular Point:

Use the scroll() method to jump to a particular point on the page.Target position specify in the form of pixels.

functionjumpScroll() {
window.scroll(0,150); // horizontal and vertical scroll targets
}

Link is Like:

<ahref="javascript:jumpScroll()">Jump to another place on the page</a>

For moving to the next page:

functionjumpScroll() {
window.scroll(0,150); // horizontal and vertical scroll targetswindow.location.replace("http://page2.html");
}

For moving to the specific page:

you are suppose to call the different functions in each link like:

<ahref="javascript:jumpScroll1()">jump to page1</a><ahref="javascript:jumpScroll2()">Jump to page2</a><ahref="javascript:jumpScroll3()">Jump to page3</a>

script is Like:

functionjumpScroll1() {
window.scroll(0,150); // horizontal and vertical scroll targetswindow.location.replace("http://page1.html");
}


functionjumpScroll2() {
window.scroll(0,250); // horizontal and vertical scroll targetswindow.location.replace("http://page2.html");
}


functionjumpScroll3() {
window.scroll(0,350); // horizontal and vertical scroll targetswindow.location.replace("http://page3.html");
}

This works fine for me.

Reference Link: http://www.mediacollege.com/internet/javascript/page/scroll.html

Post a Comment for "Jump Scroll With Redirect To Another Page Of Same Blog On Blogger"