1jQuery(document).ready(function ($) { 2 size_li = $("#myList li").size(); 3 x=3; 4 $('#myList li:lt('+x+')').show(); 5 $('#loadMore').click(function () { 6 x= (x+5 <= size_li) ? x+5 : size_li; 7 $('#myList li:lt('+x+')').show(); 8 }); 9 $('#showLess').click(function () { 10 x=(x-5<0) ? 3 : x-5; 11 $('#myList li').not(':lt('+x+')').hide(); 12 }); 13 14 $("#searchform :first-child" ).replaceWith( "<div class='form-group-new pull-right' id='search'><input type='text' name='s' id='search_text' class='form-control' value='' placeholder='Search'><button type='submit' class='form-control form-control-submit'>Submit</button><span class='search-label'><i class='glyphicon glyphicon-search'></i></span></div>"); 15 $("#searchform #search_text").attr("placeholder", "Search"); 16 $('#search').on("click",(function(e){ 17 $(".form-group-new").addClass("sb-search-open"); 18 e.stopPropagation() 19 })); 20 $(document).on("click", function(e) { 21 if ($(e.target).is("#search") === false && $(".form-control").val().length == 0) { 22 $(".form-group-new").removeClass("sb-search-open"); 23 } 24 }); 25 $(".form-control-submit").click(function(e){ 26 $(".form-control").each(function(){ 27 if($(".form-control").val().length == 0){ 28 e.preventDefault(); 29 $(this).css('border', '2px solid red'); 30 } 31 }) 32 }); 33 34 function fixDiv() { 35 var $cache = $('#fixedbc_sb'); 36 if ($(window).scrollTop() > 70) 37 $cache.css({'position': 'fixed', 'top': '0px','background':'#fbf7e5'}); 38 else 39 $cache.css({'position': 'relative', 'top': 'auto','background':'#fff'}); 40 } 41 $(window).scroll(fixDiv); 42 fixDiv(); 43 $(function () { 44 $('[data-toggle="tooltip"]').tooltip() 45 }); 46});
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.