1jQuery(document).ready(function($) { 2 3 /* ======= Blog Featured Post Slideshow - Flexslider ======= */ 4 $('.blog-slider').flexslider({ 5 animation: "fade", 6 slideshowSpeed: 8000 7 }); 8 9 10 /* ======= Blog page masonry ======= */ 11 /* Ref: http://desandro.github.io/masonry/index.html */ 12 13 var $container = $('#blog-mansonry'); 14 $container.imagesLoaded(function(){ 15 $container.masonry({ 16 itemSelector : '.post' 17 }); 18 }); 19 20 /* ======= Blog page searchbox ======= */ 21 /* Ref: http://thecodeblock.com/expanding-search-bar-with-jquery-tutroial/ */ 22 var searchContainer = $('searchbox-container'); 23 var submitIcon = $('.searchbox-icon'); 24 var inputBox = $('.searchbox-input'); 25 var searchBox = $('.searchbox'); 26 var isOpen = false; 27 submitIcon.on('click', function(){ 28 if(isOpen === false){ 29 searchBox.addClass('searchbox-open'); 30 inputBox.focus(); 31 isOpen = true; 32 } else { 33 searchBox.removeClass('searchbox-open'); 34 35 inputBox.focusout(); 36 isOpen = false; 37 } 38 }); 39 40 submitIcon.mouseup(function(){ 41 return false; 42 }); 43 searchBox.mouseup(function(){ 44 return false; 45 }); 46 $(document).mouseup(function(){ 47 if(isOpen === true){ 48 $('.searchbox-icon').css('display','block'); 49 submitIcon.click(); 50 } 51 }); 52 53 function buttonUp(){ 54 var inputVal = $('.searchbox-input').val(); 55 inputVal = $.trim(inputVal).length; 56 if( inputVal !== 0){ 57 $('.searchbox-icon').css('display','none'); 58 } else { 59 $('.searchbox-input').val(''); 60 $('.searchbox-icon').css('display','block'); 61 } 62 } 63 64 inputBox.keyup(function() { 65 buttonUp(); 66 }); 67 68 //Make sure the "Go" button is not shown when resize the browser window from mobile to desktop 69 $(window).resize(function(){ 70 $('.searchbox-icon').css('display','block'); 71 searchBox.removeClass('searchbox-open'); 72 }); 73 74 75}); 76 77 78
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.