Html jquery函数在safari中工作不正常
我正在编写以下代码。此函数创建“类型化”效果。该功能在chrome中运行良好,但在safari中不起作用。safari的jquery有问题吗Html jquery函数在safari中工作不正常,html,jquery,Html,Jquery,我正在编写以下代码。此函数创建“类型化”效果。该功能在chrome中运行良好,但在safari中不起作用。safari的jquery有问题吗 var Typed = (function() { var typed = '.typed', $typed = $(typed); function init($this) { var el = '#' + $this.attr('id'), strings = $this.
var Typed = (function() {
var typed = '.typed',
$typed = $(typed);
function init($this) {
var el = '#' + $this.attr('id'),
strings = $this.data('type-this'),
strings = strings.split(',');
var options = {
strings: strings,
typeSpeed: 100,
backSpeed: 70,
loop: true
};
var animation = new Typed(el, options);
inView(el).on('enter', function() {
animation.start();
}).on('exit', function() {
animation.stop();
});
}
if ($typed.length) {
$typed.each(function() {
init($(this));
});
}
})();
inView()来自哪里?safari中有错误吗?为什么它在safari中不起作用?请尝试另一个版本的Jquery
<span class="typed" id="type-example-1" data-type-this="text1., text2., text3., text4."></span>