html jsbin.firuti.html

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了html jsbin.firuti.html相关的知识,希望对你有一定的参考价值。

function wrap(obj) {
    return Function.prototype.call.bind(obj);
}

var slice = wrap([].slice),
    hasOwn = wrap({}.hasOwnProperty),
    ownProps = function (obj) { return Object.getOwnPropertyNames(obj); };
function isObject(obj) {
    return obj === Object(obj)
}
function isArray(obj) {
    return obj instanceof Array;
}
function isObjectOrArray(obj) {
    return isObject(obj) || isArray(obj);
}
function extendDeep(dest) {
    slice(arguments, 1).forEach(function (src) {
        ownProps(src).forEach(function (key) {
            if (isObjectOrArray(src[key])) {
                dest[key] = isArray(src[key]) ? [] : Object.create(null);
                extendDeep(dest[key], src[key]);
            } else {
                dest[key] = src[key];
            }
        });
    });
    return dest;
}
var cf = {
    slice: slice,
    isObject: isObject,
    hasOwn: hasOwn
};
function test(){}
function test2(){}

function controlEl() {
    var args = slice(arguments),
        fnc = args.pop(), objs = [];
    fnc(test,test2);
}

function resolve() {
    console.log(arguments);//3
}

function echoArgs(a,b) {
    return arguments;
}

function getModule() {
    var args = slice(arguments);
    return controlEl(args, function () {
        console.log(arguments);//2
        resolve.apply(null, arguments);
    });
}

var dataConverters = (function () {
    function dataSet(data) {
        this.data = data;
        init();

        this.convert = function () {
            return convert(this.data);
        };
        
        function init() {

        }
        function convert(data) {
            var sets = [];
            for (var k in data) {
                if (cf.hasOwn(data, k)) {
                    sets.push(data[k]);
                }
            }
            return sets;
        }
        //data = data || this.data;
    }

    return {
        dataSet: dataSet
        //return this;
    };

}());

function plainObject() {
    var o = Object.create(null);
    return o;
}
var converters = {
    dataSet: {
        convert: function (data) {
        var k,c,obj, sets = [];
        for (k in data) {
            c = null, obj = Object.create(null);
            if(isArray(data[k])) {
                c = extendDeep([],data[k]);
            } else {
                c = extendDeep(Object.create(null),data[k])
            } 
            obj[k] = c;
                sets.push(obj);
        }
        return sets;
    }
    }
    
}

var data = {
    'obj1': {'a': 1, 'b': 2},
    "DocumentTypes": [
    { "key": "01", "value": "Safety Spec" },
{ "key": "02", "value": "Process/Policy" },
{ "key": "03", "value": "Supply Chain" }
],
    'obj3': {'a': 1, 'b': 2},
    'obj4': {'a': 1, 'b': 2},
    'obj5': {'a': 1, 'b': 2},
    
};
var converter = converters.dataSet;
//var cData = converter.convert();
//{}.toString.call()
var ob = converter.convert(data);

//ob.forEach(function(d) {
    //console.log(JSON.stringify(d));
    //var name = Object.keys(d)[0];
    //console.log(d[name])
//})


//console.log(JSON.stringify(ob));










var Collapse = function (element, options) {
    this.$element      = $(element)
    this.options       = $.extend({}, Collapse.DEFAULTS, options)
    this.transitioning = null

    if (this.options.parent) this.$parent = $(this.options.parent)
    if (this.options.toggle) this.toggle()
  }

  Collapse.DEFAULTS = {
    toggle: true
  }

  Collapse.prototype.dimension = function () {
    var hasWidth = this.$element.hasClass('width')
    return hasWidth ? 'width' : 'height'
  }

  Collapse.prototype.show = function () {
    if (this.transitioning || this.$element.hasClass('in')) return

    var startEvent = $.Event('show.bs.collapse')
    this.$element.trigger(startEvent)
    if (startEvent.isDefaultPrevented()) return

    var actives = this.$parent && this.$parent.find('> .panel > .in')

    if (actives && actives.length) {
      var hasData = actives.data('bs.collapse')
      if (hasData && hasData.transitioning) return
      actives.collapse('hide')
      hasData || actives.data('bs.collapse', null)
    }

    var dimension = this.dimension()

    this.$element
      .removeClass('collapse')
      .addClass('collapsing')
      [dimension](0)

    this.transitioning = 1

    var complete = function () {
      this.$element
        .removeClass('collapsing')
        .addClass('collapse in')
        [dimension]('auto')
      this.transitioning = 0
      this.$element.trigger('shown.bs.collapse')
    }

    if (!$.support.transition) return complete.call(this)

    var scrollSize = $.camelCase(['scroll', dimension].join('-'))

    this.$element
      .one($.support.transition.end, $.proxy(complete, this))
      .emulateTransitionEnd(350)
      [dimension](this.$element[0][scrollSize])
  }

  Collapse.prototype.hide = function () {
    if (this.transitioning || !this.$element.hasClass('in')) return

    var startEvent = $.Event('hide.bs.collapse')
    this.$element.trigger(startEvent)
    if (startEvent.isDefaultPrevented()) return

    var dimension = this.dimension()

    this.$element
      [dimension](this.$element[dimension]())
      [0].offsetHeight

    this.$element
      .addClass('collapsing')
      .removeClass('collapse')
      .removeClass('in')

    this.transitioning = 1

    var complete = function () {
      this.transitioning = 0
      this.$element
        .trigger('hidden.bs.collapse')
        .removeClass('collapsing')
        .addClass('collapse')
    }

    if (!$.support.transition) return complete.call(this)

    this.$element
      [dimension](0)
      .one($.support.transition.end, $.proxy(complete, this))
      .emulateTransitionEnd(350)
  }

  Collapse.prototype.toggle = function () {
    this[this.$element.hasClass('in') ? 'hide' : 'show']()
  }






































<!DOCTYPE html>
<html>
<head>

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" type="text/css" />

  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>

    
    <<div class="container-fluid" data-page="@default">
        <div class="row" id='topBarSection'>
            <div class="col-md-12" id='topBar' data-section="navbar">
                <!--Header/Nav content area-->
            </div>
        </div>

        <div class="row" id='topNavSection'>
            <div class="col-md-12" id='topNav'>
                <!--Header/Nav content area-->
            </div>
        </div>

        <div class="row" id='bodySection'>

            <div class="col-md-2" id='leftNav'>
                <!--Left Sidebar content area-->
				<div class="panel-group" id="accordion">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h4 class="panel-title">
                            <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne" class="collapsed"><span class="glyphicon glyphicon-folder-close">
                            </span>KNOWLEDGE HUB</a>
                        </h4>
                    </div>
                    <div id="collapseOne" class="panel-collapse collapse" style="height: 0px;">
                        <div class="panel-body">
                            
                        </div>
                    </div>
                </div>
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h4 class="panel-title">
                            <a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" class="collapsed"><span class="glyphicon glyphicon-th">
                            </span>HAPPY MEAL PROGRAM</a>
                        </h4>
                    </div>
                    <div id="collapseTwo" class="panel-collapse collapse">
                        <div class="panel-body">
							<table class="table">
                                <tbody><tr>
                                    <td>
                                        <span class="glyphicon glyphicon-pencil text-primary"></span><a href="http://www.jquery2dotnet.com">Articles</a>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <span class="glyphicon glyphicon-flash text-success"></span><a href="http://www.jquery2dotnet.com">News</a>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <span class="glyphicon glyphicon-file text-info"></span><a href="http://www.jquery2dotnet.com">Newsletters</a>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <span class="glyphicon glyphicon-comment text-success"></span><a href="http://www.jquery2dotnet.com">Comments</a>
                                        <span class="badge">42</span>
                                    </td>
                                </tr>
                            </tbody></table>
                        </div>
                    </div>
                </div>
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h4 class="panel-title">
                            <a data-toggle="collapse" data-parent="#accordion" href="#collapseThree" class="collapsed"><span class="glyphicon glyphicon-user">
                            </span>CHEMICAL</a>
                        </h4>
                    </div>
                    <div id="collapseThree" class="panel-collapse collapse">
                        <div class="panel-body">
                        </div>
                    </div>
                </div>
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h4 class="panel-title">
                            <a data-toggle="collapse" data-parent="#accordion" href="#collapseFour" class="collapsed"><span class="glyphicon glyphicon-file">
                            </span>MATERIALS</a>
                        </h4>
                    </div>
                    <div id="collapseFour" class="panel-collapse collapse">
                        <div class="panel-body">
                        </div>
                    </div>
                </div>
				<div class="panel panel-default">
                    <div class="panel-heading">
                        <h4 class="panel-title">
                            <a data-toggle="collapse" data-parent="#accordion" href="#collapseFive" class="collapsed"><span class="glyphicon glyphicon-file">
                            </span>REGULATORY</a>
                        </h4>
                    </div>
                    <div id="collapseFive" class="panel-collapse collapse">
                        <div class="panel-body">
                        </div>
                    </div>
                </div>
            </div>
            </div>

            <div class="col-md-10" id="main">
                
                </div>


        </div>
        <div class="row" id='footerSection'>
            <div class="col-md-12" id='bottomBar'>
            </div>
        </div>
    </div>
</body>
</html>

以上是关于html jsbin.firuti.html的主要内容,如果未能解决你的问题,请参考以下文章

Html.Partial 与 Html.RenderPartial 和 Html.Action 与 Html.RenderAction

html Html模板/ Html Boilerplate |标签HTML

html里怎么引用一个html的头部

html5与传统html区别

html4和html5的区别

HTML元素