lorenzo
Posts: 0
Joined: Fri Feb 08, 2013 3:50 am

Carousel content(Index) upon button click to show contents beggining at the top

Carousel content(Index) upon button click to show contents beggining at the top...
I have several buttons in index 0 of my carousel. Upon clicking any button, the carousel will go and show the index contents with regards to what the button points out to. The problem is if the button is in the middle of the page(half scrolled), upon showing the carousel content. I'ved noticed that the content is also shown on the middle part of the page(half scrolled). How do I make sure that the page is always shown beginning at the top.

lorenzo
Posts: 0
Joined: Fri Feb 08, 2013 3:50 am

Carousel content(Index) upon button click to show contents beggining at the top

I tried this code

$(window).scroll(function(e) {
if($(window).scrollTop() =0); {
$(window).scrollTop(0);
}
});

it makes certain that the page shown begins at the top, the problem is it locks the scroll bar at the top.....

lorenzo
Posts: 0
Joined: Fri Feb 08, 2013 3:50 am

Carousel content(Index) upon button click to show contents beggining at the top

Yahoo!!! got it by myself....

on run javascript, put this

$(window).scrollTop(0);

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Carousel content(Index) upon button click to show contents beggining at the top

Hello Lorenzo,

Thank you for the update, glad it works!

Return to “Issues”