1 2// blog.js 3(function(jQuery) { 4 jQuery(document).ready(function() { 5 const blogItems = jQuery('.blog-item'); 6 const viewBtn = jQuery('.view-btn.btn-style-2'); 7 8 if (blogItems.length <= 5) { 9 viewBtn.hide(); 10 return; 11 } 12 13 blogItems.slice(5).hide(); 14 let hiddenElements = blogItems.filter(':hidden'); 15 const animationTime = 200; 16 17 viewBtn.on('click', function() { 18 if (viewBtn.text() === "View All") { 19 viewBtn.text("View Less"); 20 21 hiddenElements.each(function(index) { 22 const element = jQuery(this); 23 setTimeout(function() { 24 element.fadeIn(); 25 }, (index + 1) * animationTime); 26 }); 27 } else { 28 viewBtn.text("View All"); 29 blogItems.slice(5).hide(); 30 } 31 32 hiddenElements = blogItems.filter(':hidden'); 33 }); 34 }); 35})(jQuery); 36 37// single-article.js 38(function ($) { 39 $(function () { 40 if (!$(".entry-content").length) return; 41 42 const $firstH2 = $(".entry-content h2").first(); 43 44 if (!$firstH2.length) return; 45 46 var contentToWrap = $(".entry-content h2").first().prevAll().length < $(".entry-content h3").first().prevAll().length ? $(".entry-content h2").first().prevAll(): $(".entry-content h3").first().prevAll(); 47 if( contentToWrap.length == 0 ) 48 { 49 contentToWrap = $(".entry-content h2").first().prevAll(); 50 } 51 52 contentToWrap.uniqueSort().appendTo(".wrapper-text"); 53 $(".entry-content").contents().first().appendTo(".wrapper-text"); 54 if($(".entry-content h2").length > 1) 55 { 56 $(".entry-content h2") 57 .last() 58 .add($(".entry-content h2").last().nextAll()) 59 .appendTo(".last-paragraph"); 60 } 61 else 62 { 63 if($(".entry-content h3").length > 1) 64 { 65 $(".entry-content h3") 66 .last() 67 .add($(".entry-content h3").last().nextAll()) 68 .appendTo(".last-paragraph"); 69 } 70 } 71 $(".img-float-rigth").first().prependTo(".entry-content"); 72 }); 73})(jQuery); 74 75// test1.js 76(function ($) { 77 $(document).ready(function () { 78 // --------------------------------------------- 79 // Initialization 80 // --------------------------------------------- 81 console.log("test1"); // DEBUG 82 if (!$(".example").length) return; 83 84 // --------------------------------------------- 85 // Events 86 // --------------------------------------------- 87 88 // Example click 89 $(".example").on("click", function () { 90 // 91 }); 92 93 // --------------------------------------------- 94 // Functions 95 // --------------------------------------------- 96 97 // Example function 98 function example() { 99 // 100 } 101 }); 102})(jQuery); 103 104// test2.js 105(function ($) { 106 $(document).ready(function () { 107 // --------------------------------------------- 108 // Initialization 109 // --------------------------------------------- 110 console.log("test1"); // DEBUG 111 if (!$(".example").length) return; 112 113 // --------------------------------------------- 114 // Events 115 // --------------------------------------------- 116 117 // Example click 118 $(".example").on("click", function () { 119 // 120 }); 121 122 // --------------------------------------------- 123 // Functions 124 // --------------------------------------------- 125 126 // Example function 127 function example() { 128 // 129 } 130 }); 131})(jQuery);
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.