Will Fix Will Fix - 4 months ago 5x
HTML Question

In an HTML page I need to anchor to a tag on mouseover

<a href="#anchor1">
<img src="http://www.test.com/images/test/test.png" width="80" height="150" />

<div id="anchor1">...</div>

When I mouse over test.png I need it to scroll the page to #anchor1 ..help_me


I'm not sure you're using "anchor" in the generally accepted sense. the tag is a "anchor" tag that is used to wrap around an image or text link, or now virtually any DOM object it consists of either a href tag, which is it's target, or a name tag in which case it IS a target. so a page with

<a id="part1"/><h3>part 1</h3></a>


<a href="#part1"><img src="..." onMouseover="$.scrollTo('#part1');"></a>

clicking on the image would make the page scroll so that the h3 containing "part1" would be at the top of the page.

to do it with jQuery and mouseOver you'll need to use jQuery scrollTo() then you can define your speed and easing.