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
Html jquery函数在safari中工作不正常_Html_Jquery - Fatal编程技术网

Html jquery函数在safari中工作不正常

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.

我正在编写以下代码。此函数创建“类型化”效果。该功能在chrome中运行良好,但在safari中不起作用。safari的jquery有问题吗


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>