1 2function getOuterHTML(object) { 3var element; 4if (!object) return null; 5element = document.createElement("div"); 6element.appendChild(object.cloneNode(true)); 7return element.innerHTML; 8} 9function readmorep(pnumber){ 10 var pCount = 1; 11 var numOfP = jQuery('.category-description > p, .short-description .std p').length; 12 var testArray = []; 13 if(pnumber < numOfP){ 14 jQuery('.category-description, .short-description .std').children().each(function(){ 15 if(pCount==pnumber) 16 { if(jQuery(this).is('h2,h3,h4,h5,h6,ul,ol,table,td,tr')){ 17 return true; 18 } 19 var hiddenDiv = jQuery(this).after('<div class="hiddencontent" />'); 20 } 21 if(pCount>pnumber) 22 { 23 testArray.push(getOuterHTML(jQuery(this)[0])); 24 25 jQuery(this).remove(); 26 27 } 28 if(jQuery(this).is('h2,h3,h4,h5,h6,ul,ol,table,td,tr')){ 29 return true; 30 } 31 pCount++; 32 33 34 }); 35 } 36 37 testArray = testArray.join(''); 38 jQuery('.hiddencontent').append('<p>').html(testArray); 39 40 41 jQuery('.hiddencontent').css('display', 'none').after('<a href="javascript:void(0);" title="readmore" class="contentreadmore">Read More</a>'); 42 43 jQuery('.contentreadmore').click(function(){ 44 45 jQuery(this).prev().toggleClass('selecteddiv').slideToggle(); 46 47 var button = jQuery('.contentreadmore').text(); 48 49 if(button == 'Read More'){ 50 51 jQuery(this).text('Read Less'); 52 53 } 54 if(button == 'Read Less'){ 55 56 57 jQuery(this).text('Read More'); 58 } 59 60 61 62 63 64 }); 65} 66 67
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.