Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/87.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
停止jQuery中的HTML5音频标记_Jquery_Html_Audio - Fatal编程技术网

停止jQuery中的HTML5音频标记

停止jQuery中的HTML5音频标记,jquery,html,audio,Jquery,Html,Audio,我正在使用jquery插件进行站点浏览。要定义巡更的站点,请创建一个具有特定ID的有序列表,并使用行项目分隔站点 HTML: 这是行不通的 我使用了可用的joyride插件welcome.pause()应该是doElement.pause()。只要您实际选择了DOM元素,代码就可以工作: var welcome = $("#welcome")[0]; 或 我已经解决了这个问题: 替换: welcome.pause(); 在jquery函数中,使用: jQuery('audio').each(

我正在使用jquery插件进行站点浏览。要定义巡更的站点,请创建一个具有特定ID的有序列表,并使用行项目分隔站点

HTML:

这是行不通的

我使用了可用的joyride插件

welcome.pause()
应该是
doElement.pause()
。只要您实际选择了DOM元素,代码就可以工作:

var welcome = $("#welcome")[0];


我已经解决了这个问题:

替换:

welcome.pause();
在jquery函数中,使用:

jQuery('audio').each(function(){ this.pause() });
var welcome = $("#welcome")[0];
var welcome = document.getElementById('welcome');
welcome.pause();
jQuery('audio').each(function(){ this.pause() });