Web/js/jqplot/examples/example.js

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

$(document).ready(function(){
    if (!$.jqplot._noCodeBlock) {
        $('script.code').each(function(index) {
            if ($('pre.code').eq(index).length  ) {
                $('pre.code').eq(index).text($(this).html());
            }
            else {
                // var str = $(this).text();
                // $('div.jqplot-target').eq(index).after($('<pre class="code">'+str+'</pre>'));
                var pre = $('<pre class="code prettyprint brush: js"></pre>');
                $('div.jqplot-target').eq(index).after(pre);
                pre.text($(this).html());
                pre = null;
            }
        });

        $('script.common').each(function(index) {
            $('pre.common').eq(index).text($(this).html());
        });

        var elstr='';
        if ($('script.include, link.include').length > 0) {

            if ($('pre.include').length == 0) {
                var temp = [
                    '<div class="code prettyprint include">',
                    '<p class="text">The charts on this page depend on the following files:</p>',
                    '<pre class="include prettyprint brush: html gutter: false"></pre>',
                    '</div>'
                ];

                temp = $(temp.join('\n'));
                $('div#example-content').append(temp);
                temp = null;
            }      


            $('script.include').each(function(index) {
                if (elstr !== '') {
                    elstr += '\n';
                }
                elstr += '<script type="text/javascript" src="'+$(this).attr('src')+'"></script>';
            });

            $('link.include').each(function(index) {
                if (elstr !== '') {
                    elstr += '\n';
                }
                elstr += '<link rel="stylesheet" type="text/css" hrf="'+$(this).attr('href')+'" />';
            })

            $('pre.include').text(elstr);
        }

        else {
            $('pre.include').remove();
            $('div.include').remove();
        }
    }

后面还有 54 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。