1(function($) { 2 "use strict"; 3 $.fn.spasticNav = function(options) { 4 5 options = $.extend({ 6 overlap : 0, 7 speed : 500, 8 reset : 50, 9 color : '#00c6ff', 10 easing : 'swing' 11 }, options); 12 13 return this.each(function() { 14 15 var nav = $(this), 16 currentPageItem = nav.find('>.current-menu-item,>.current-menu-parent,>.current-menu-ancestor'), 17 hidden = true, 18 blob, 19 reset; 20 if (currentPageItem.length === 0) { 21 currentPageItem = nav.find('li').eq(0); 22 } 23 24 $('<li id="blob"></li>').css({ 25 width : currentPageItem.css('width'), 26 height : currentPageItem.css('height'), 27 left : currentPageItem.position().left, 28 top : currentPageItem.position().top - options.overlap / 2, 29 backgroundColor : hidden ? options.color : currentPageItem.find('a').css('backgroundColor'), 30 opacity: hidden ? 0 : 1 31 }).appendTo(this); 32 blob = $('#blob', nav); 33 34 nav.find('>li:not(#blob)').hover(function() { 35 // mouse over 36 clearTimeout(reset); 37 var bg = $(this).css('backgroundColor'); 38 $(this).addClass('blob_over'); 39 blob.css({backgroundColor: bg}).animate( 40 { 41 left: $(this).position().left, 42 top: $(this).position().top - options.overlap / 2, 43 width: $(this).css('width'), 44 height: $(this).css('height') + options.overlap, 45 opacity: 1 46 }, 47 { 48 duration : options.speed, 49 easing : options.easing, 50 queue : false 51 } 52 ); 53 }, function() { 54 // mouse out 55 reset = setTimeout(function() { 56 blob.animate({ 57 opacity: 0 //hidden ? 0 : 1, 58 }, options.speed) 59 }, options.reset); 60 $(this).removeClass('blob_over'); 61 }); 62 63 64 }); // end each 65 66 }; 67 68})(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.