【问题标题】:Mouse Hover on text changes images in fix location - Wordpress鼠标悬停在文本上会更改固定位置的图像 - Wordpress
【发布时间】:2015-09-21 16:10:43
【问题描述】:

我正在处理一个 wordpress 页面,我想在它的底部设置一个固定的图像和 3 个不同的文本。

我想要做的是,当鼠标悬停在Text1 上时,顶部图像发生变化,当鼠标悬停在Text2 上时,顶部图像再次发生变化。

示例:http://fr.muaythaitv.com/pages/helpcenter/advertise.php

我在网上搜索,但找不到我要找的东西,希望有人能帮助我!

【问题讨论】:

    标签: 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 - 第二个示例是实时链接,第三个示例是锚点禁用链接。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-02-18
      • 2014-05-13
      • 2016-02-20
      • 2013-02-04
      • 2012-11-15
      • 2013-10-17
      • 1970-01-01
      相关资源
      最近更新 更多