【问题标题】:Mouse Hover on text changes images in fix location - Wordpress鼠标悬停在文本上会更改固定位置的图像 - Wordpress
【发布时间】:2015-09-21 16:10:43
【问题描述】:
【问题讨论】:
标签:
javascript
jquery
wordpress
hover
rollover
【解决方案1】:
你的意思是like this?
HTML 标记。
<div id="gallery2">
<div id="panel">
<img id="largeImage2" src="http://placehold.it/100/" />
<div id="description">main image with simple links</div>
</div>
<div id="thumbs2">
<a href="http://placehold.it/100/ff3322" >link1</a>
<a href="http://placehold.it/100/ffc5c5">link1</a>
<a href="http://placehold.it/100/eec777">link1</a>
<a href="http://placehold.it/100/887744">link1</a>
</div>
</div>
jQuery :
$('#thumbs2 a').hover(function(){
$('#largeImage2').attr('src',$(this).attr('href'));
});
Css 随心所欲..
参见Here again - 第二个示例是实时链接,第三个示例是锚点禁用链接。