javascript - Reset scrollbar position in DIV Safari 6.0.4 -
i having similar issue below scroll reset:
how reset persistent scrollbar position after div refresh in ff3?
the scrollleft works in ff , chrome, not in safari 6.0.4. strange code looks sound me (although have not been doing long!) code set below:
the link
<a id="bakers" href="#">bakers dozen</a>
this div need call separate html file
<div id="bakers2"> <div class="gallery"><img src="images/9.bakersdozen/2.bakers.jpg" alt="" /><p>january</p></div> <div class="gallery"><img src="images/9.bakersdozen/1.bakers.jpg" alt="" /><p>february</p></div>
into on body index page
<div class="slider"> </div>
the css:
.slider { left: 285px; position: absolute; top: 150px; } .gallery { float: left; margin: 5px; } #bakers2 { width:2650px; }
and script (which in body)
$(document).ready(function() { $('#bakers').click(function(){ $('.slider').load("bakers.html #bakers2"); $('body').scrollleft(0); }); });
thanks help. please let me know if have missed code you'd need in order help
Comments
Post a Comment