1$(document).ready(function () { 2 var $editableSection = $('.editable__container'); 3 4 if ($editableSection.length) { 5 $editableSection.each(function () { 6 7 var $content = $(this), 8 $showMoreContent = $content.find('.contentExpandWrap'), 9 $showMoreLink = $content.find('#readMoreLink'); 10 11 if($showMoreLink.length) { 12 13 // fallback for already created showmore links with span node 14 if($showMoreLink[0].nodeName == "SPAN") { 15 $showMoreLink.attr("href", "#editableAnimateShowLess"); 16 replaceElementTag($showMoreLink, '<a></a>'); 17 } 18 19 function replaceElementTag(targetSelector, newTagString) { 20 $(targetSelector).each(function(){ 21 var newElem = $(newTagString, {html: $(this).html()}); 22 $.each(this.attributes, function() { 23 newElem.attr(this.name, this.value); 24 }); 25 $(this).replaceWith(newElem); 26 }); 27 } 28 29 $showMoreContent.add($showMoreLink).removeClass("expand"); 30 $showMoreContent.hide(); 31 $showMoreLink.text("Show More"); 32 33 $content.on("click", '#readMoreLink', function(e){ 34 e.preventDefault(); 35 var $readMoreLink = $(this), 36 $readMoreLinkTooltip = $('body .redactor-link-tooltip .redactor-link-tooltip-action:first-child'); 37 38 if ($readMoreLinkTooltip.length) $readMoreLinkTooltip.parent().css('visibility', 'hidden'); 39 40 if ($readMoreLink.text() === 'Show More') { 41 $content.removeAttr('id'); 42 $readMoreLink.text("Show Less"); 43 } else { 44 $content.attr('id', 'editableAnimateShowLess'); 45 $readMoreLink.text("Show More"); 46 }; 47 $showMoreContent.add($readMoreLink).toggleClass("expand"); 48 }); 49 50 }; 51 52 }); 53 } 54});
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.