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
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