使用把手点击图像时显示视频?

问题描述

我正在尝试在一个网页上工作,当我单击图像标签时,我应该能够显示隐藏的视频。我用过把手。我还想在某些用户点击其他照片时关闭该视频。

    <script type = "text/x-handlebars-template" id = "template">
            <div class = "row row-eq-height">
                {{#each images}}
                    <div class = " col-xs-12 col-md-3">
                        <div class = "thumbnail">
                            <img src = "{{src}}" style = "width : 50%;height :25%;" 
                             onClick = document.getElementById("video").style.display = "block";/>
                            <iframe style = "display:none;" id = "video" src = "{{video}}"/>
                            <h3>{{Song}}</h3>
                        </div>
                    </div>
                {{/each}}
            </div>
    </script>   

这不起作用,视频被隐藏,但是当我按照片时它们无法显示回来。

This is how it looks. I want my video to play when I click on an image.They should disappear when I click on other and that other video has to start playing.

如果您需要进一步说明我的查询内容,请随时提出问题。 任何帮助是极大的赞赏。预先感谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)