1$(document).ready(function(){ 2 3 // Capitalize the first letter of each word in the navigation since Crafter only capitalizes the first letter of the first word 4 // Also, uppercase the entire word if it matches anything in the upperArray (TPC or PGA). This list can be added to as we go. 5 $.each($('.content-area .list-unstyled li a'), function(){ 6 var split = $(this).text().split("-"); 7 var html = ''; 8 var upperArray = ['tpc', 'pga', 'tour']; 9 $.each(split, function(index,value){ 10 // separator is a space put back between words in a nav item but not an unnecessary one afterwards 11 if(index != split.length-1){ 12 var separator = ' '; 13 } else { 14 var separator = ''; 15 } 16 if($.inArray(value.toLowerCase(), upperArray) !== -1){ 17 html += value.toUpperCase() + separator; 18 } else { 19 var first_letter = value.substr(0,1); 20 html += first_letter.toUpperCase() + value.substring(1) + separator; 21 } 22 }); 23 $(this).text(html); 24 }); 25 26 27 $('.container-fluid').find('img').each(function(){ 28 if(!$(this).hasClass('noFX')){ 29 $(this).addClass('img-responsive'); 30 $(this).css('margin','0 auto'); 31 } 32 }); 33 34 $('.container-fluid').find('table').each(function(){ 35 if(!$(this).hasClass('noFX')){ 36 $(this).wrap( "<div class='table-responsive'></div>" ); 37 $(this).addClass('table'); 38 $(this).addClass('hidden-xs'); 39 $(this).addClass('table-condensed'); 40 $(this).addClass('table-bordered'); 41 $(this).removeAttr("style"); 42 $(this).parent().css('margin' , '0 auto'); 43 $(this).find('td').each(function(){ 44 $(this).css({ 45 'vertical-align' : 'middle', 46 'text-align' : 'center', 47 }); 48 }); 49 $(this).find('th').each(function(){ 50 $(this).css({ 51 'vertical-align' : 'middle', 52 'text-align' : 'center', 53 }); 54 }); 55 56 var rowsArray = []; 57 var rowHeadersArray = []; 58 var columnsLength = $(this).find('tr')[0].cells.length;; 59 60 $(this).find('tr').each(function(){ 61 $(this).find('td').each(function(){ 62 rowsArray.push($(this).html()); 63 }); 64 }); 65 $(this).find('tr').each(function(){ 66 $(this).find('th').each(function(){ 67 rowHeadersArray.push($(this).text()); 68 }); 69 }); 70 71 var originalTable = $(this).parent().html(); 72 $(this).html(''); 73 var j=0; 74 for(var i=0; i < rowsArray.length; i++){ 75 if(0 == i % columnsLength){ 76 if(i == 0){ 77 $(this).append('<tr><td><hr style="border-top: 0 solid #eee;"></td></tr>'); 78 }else{ 79 $(this).append('<tr><td><hr></td></tr>'); 80 } 81 } 82 if(rowHeadersArray.length > 0){ 83 $(this).append('<tr><td style="vertical-align:center; text-align: center;"><b>' + rowHeadersArray[j] + ': </b>' + rowsArray[i] + '</td></tr>'); 84 j++; 85 if(j > rowHeadersArray.length-1){ 86 j = 0; 87 } 88 }else{ 89 $(this).append('<tr><td style="vertical-align:center; text-align: center;">' + rowsArray[i] + '</td></tr>'); 90 } 91 } 92 93 $(this).append('<tr><td><hr style="border-top: 0 solid #eee;"></td></tr>'); 94 95 $(this).removeClass('hidden-xs'); 96 $(this).addClass('hidden-sm'); 97 $(this).addClass('hidden-md'); 98 $(this).addClass('hidden-lg'); 99 $(this).parent().append(originalTable); 100 101 102 } 103 }); 104 105});
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.