duannao1920 2017-03-30 09:42
浏览 109

除了一个元素之外的div上的href

I made a "musicbox" which shows a music cover and when hovered over it shows a toggleable playbutton, to either play or pause the music. Now what i want to achieve is the following:

  • When clicked ON the play/pause button the music will play or pause (did this part)
  • when clicking anywhere on the cover except the play/pause button it should link (href?) to another page

I tried several things but cannot get the playbutton excluded from the href, i think it should remain inside the ".overlay" because they contents need to be hidden unless you hover over the div/musicbox

echo"
                <div class='musicbox' align='center'>
                    <a>
                        <div class='overlay'>
                            <img data-value='../../admin/uploads/tracks/".$music_track."' 
                            data-value='../../admin/uploads/tracks/".$music_oggfile."' 
                            onclick='updateSource(this)' class='btnplay' src='../media/images/go.png'></img>
                            <img class='btnpause' src='../media/images/stop.png'></img>
                            <div class='desc'>".$music_title."</div>
                        </div>
                    </a>
                    <img class='cover' src='../../admin/uploads/images/".$music_image."' width='350' height='350'>
                </div>";
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 有偿 写代码 要用特定的软件anaconda 里的jvpyter 用python3写
    • ¥20 cad图纸,chx-3六轴码垛机器人
    • ¥15 移动摄像头专网需要解vlan
    • ¥20 access多表提取相同字段数据并合并
    • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角
    • ¥20 Java-Oj-桌布的计算
    • ¥15 powerbuilder中的datawindow数据整合到新的DataWindow
    • ¥20 有人知道这种图怎么画吗?
    • ¥15 pyqt6如何引用qrc文件加载里面的的资源
    • ¥15 安卓JNI项目使用lua上的问题