Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Loading HTML into div - unusual issue [closed]

I have an unusual issue with a website I have created for a friend.

I have created the index.html with links down the left sidebar to remain constant. When you click a link, an external HTML file is called inside the main div in the centre of the page.

This works wonderfully but with one small issue (which is actually an annoying problem)!

If you click the first link, 'products' for example, you can scroll from the left all the way to the right to the last image nicely. If you then click 'fashion', another HTML file is called but it calls it at the stage you left off from 'products' i.e. all the way to the right, and not at the start.

I basically need to force the HTML to call the page at the beginning each time a link is clicked. Here is my weblink for you to see what I am talking about...

http://www.hannahdakin.co.uk/betasite

P.S. I can't find anyone else with a similar issue after looking on forums, but there might be a term for this problem that I am not familiar with.

I would be eternally grateful if anyone could help!!

like image 429
user2393778 Avatar asked May 17 '13 12:05

user2393778


1 Answers

You can use .scrollLeft(0) to reset the horizontal scroll position in the <div>.

like image 69
Elle Avatar answered Oct 26 '22 15:10

Elle