Mobile Safari: link () element over video element does not work on click

前端 未结 5 1575
轻奢々
轻奢々 2020-12-09 04:19

my current project is a html website that contains a dropdown menu (javascript/jquery) and a html5 videoplayer (video-tag only).

When clicking on a menu entry, the d

5条回答
  •  粉色の甜心
    2020-12-09 05:02

    Your explanation & solution are correct. For someone interested in some code to disable the controls on the menu dropdown:

    $('#menu-dropdown').click(function() {
      if ($("video:visible")) {
        if ($("video").prop("controls")) {
          $("video").prop("controls", false);  
        } else {
          $("video").prop("controls", true)
        }  
      }
    })
    

    Hope this helps!

提交回复
热议问题