Prevent remembering scrollLeft after page reload

E

Emil

I have a div in which I set scrollLeft on click event.
The problem is browser in some way remebers its value after page
reloading (pressing F5). Is there any way to prevent it?

code:
<div id="scrolled" style="width:50px;height:10px;overflow:hidden"
onclick="this.scrollLeft+=50;"<div style="width:200px;height:10px;overflow:hidden">
<div
style="width:50px;height:50px;float:left;background-color:green"></div>
<div style="width:50px;height:50px;float:left;background-color:red"></div>
<div
style="width:50px;height:50px;float:left;background-color:blue"></div>

</div>
</div>

When I open such page, there is small green rectangle. Now when I click
on it it turns red. This is ok. But when I reload page (F5) it still is
red. After hard reload (ctrl-F5) everything is ok.
Is there any way to prevent such behaviour?
emil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,744
Latest member
CortneyMcK

Latest Threads

Top