1jQuery(document).ready(function($) { 2 3tableObjects = $("table"); 4breakpoint = 480; 5 6 tableObjects.each(function () { 7 var headers = [], 8 artHeaders = ' no-headers'; 9 $('tr th', this).each(function () { 10 artHeaders = ''; 11 headers.push( $(this).html() ); 12 }); 13 14 artTable = '<div class="art-table' + artHeaders + '"><div class="art-tbody">'; 15 $('tr', this).each(function () { 16 if( $(this).find('td').length > 0 ) { 17 artTable += '<div class="art-tr">'; 18 $('td', this).each(function () { 19 artTable += '<div class="art-td">'; 20 if( '' == artHeaders ) { 21 artTable += ' <div class="art-td-first">'+headers[$(this).index()]+'</div>'; 22 } 23 artTable += ' <div class="art-td-last">'+$(this).html()+'</div>'; 24 artTable += ' <div class="art-clearfix"></div>'; 25 artTable += '</div>'; 26 }); 27 artTable += '</div>'; 28 } 29 }); 30 artTable += '</div></div>'; 31 32 $(this).after(artTable); 33 }); 34 35 //---- For ie5 - ie8 36 var div = document.createElement("div"); 37 div.innerHTML = "<!--[if lt IE 9]><i></i><![endif]-->"; 38 var isIeLessThan9 = (div.getElementsByTagName("i").length == 1); 39 if( isIeLessThan9 ) { 40 $('.art-table .art-tbody .art-tr:nth-child(2n)').addClass('even-rows'); 41 $('.art-table .art-tbody .art-tr:nth-child(2n+1)').addClass('odd-rows'); 42 if( document.documentElement.offsetWidth < breakpoint ) { 43 tableObjects.css('display','none'); 44 $('div.art-table').css('display','block'); 45 } else { 46 tableObjects.css('display','block'); 47 $('div.art-table').css('display','none'); 48 } 49 $(window).on('resize', function () { 50 if( document.documentElement.offsetWidth < breakpoint ) { 51 tableObjects.css('display','none'); 52 $('div.art-table').css('display','block'); 53 } else { 54 tableObjects.css('display','block'); 55 $('div.art-table').css('display','none'); 56 } 57 }); 58 } 59 60});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.