senamion无法正常工作,浏览器版本出现错误

senamion does not work properly , with error in browser version

本文关键字:浏览器 版本 错误 工作 常工作 senamion      更新时间:2023-09-26

我使用senamion插件从该链接创建多侧面选择框,它显示了多侧面布局,但单击不起作用,并且不会将所选项目发送到下一个框

在我的浏览器控制台中,我得到

TypeError: $.browser is undefined
http://localhost:3000/assets/jquery.multiselect2side.js?body=1
Line 278

从文档链接$.brower属性已弃用。。您可以在添加urjquery.js文件后添加以下代码作为脚本文件,以了解您的浏览器信息。

(function() {
    var matched, browser;
    jQuery.uaMatch = function( ua ) {
        ua = ua.toLowerCase();
        var match = /(chrome)[ '/](['w.]+)/.exec( ua ) ||
            /(webkit)[ '/](['w.]+)/.exec( ua ) ||
            /(opera)(?:.*version|)[ '/](['w.]+)/.exec( ua ) ||
            /(msie) (['w.]+)/.exec( ua ) ||
            ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:(['w.]+)|)/.exec( ua ) ||
            [];
        return {
            browser: match[ 1 ] || "",
            version: match[ 2 ] || "0"
        };
    };
    matched = jQuery.uaMatch( navigator.userAgent );
    browser = {};
    if ( matched.browser ) {
        browser[ matched.browser ] = true;
        browser.version = matched.version;
    }
// Chrome is Webkit, but Webkit is also Safari.
    if ( browser.chrome ) {
        browser.webkit = true;
    } else if ( browser.webkit ) {
        browser.safari = true;
    }
    jQuery.browser = browser;
    jQuery.sub = function() {
        function jQuerySub( selector, context ) {
            return new jQuerySub.fn.init( selector, context );
        }
        jQuery.extend( true, jQuerySub, this );
        jQuerySub.superclass = this;
        jQuerySub.fn = jQuerySub.prototype = this();
        jQuerySub.fn.constructor = jQuerySub;
        jQuerySub.sub = this.sub;
        jQuerySub.fn.init = function init( selector, context ) {
            if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
                context = jQuerySub( context );
            }
            return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
        };
        jQuerySub.fn.init.prototype = jQuerySub.fn;
        var rootjQuerySub = jQuerySub(document);
        return jQuerySub;
    };
})();