1//========================================= 2// ShowHide 3//========================================= 4 5(function($){ 6$.fn.flowToggle = function(options) { 7 8 var defaults = { 9 showHideSelector : ".flowShowHide", 10 toggleText : "", 11 toggleTextAfter : "", 12 hideToggle : false 13 }; 14 15 var o = $.extend(defaults, options); 16 17 $(o.showHideSelector).hide(); 18 19 var toggle = $(this); 20 21 var toggleHtmlText = $(this).html(); 22 23 if(toggleHtmlText != ""){ 24 o.toggleText = toggle.html(); 25 } 26 27 //insert the toggle text 28 if(o.toggleText != ""){ 29 $(this).html(o.toggleText); 30 } 31 32 33 toggle.click(function(){ 34 clickedToggle = $(this); 35 $(this).siblings(o.showHideSelector).slideToggle("slow", changeToggleText); 36 return false; 37 }); 38 39 function changeToggleText(){ 40 if(o.hideToggle){ 41 clickedToggle.hide(); 42 } 43 44 if(o.toggleTextAfter!=""){ 45 if($(this).is(":visible")){ 46 clickedToggle.html(o.toggleTextAfter); 47 } 48 }; 49 50 if(o.toggleText!=""){ 51 if(!$(this).is(":visible")){ 52 clickedToggle.html(o.toggleText); 53 } 54 }; 55 } 56 57 58}; 59})(jQuery); 60 61(function($){ 62 /** 63 * jQuery delayed event execution. 64 */ 65 $.fn.delay = function(options) { 66 var timer; 67 var delayImpl = function(eventObj) { 68 if (timer != null) { 69 clearTimeout(timer); 70 } 71 var newFn = function() { 72 options.fn(eventObj); 73 }; 74 timer = setTimeout(newFn, options.delay); 75 } 76 77 return this.each(function() { 78 var obj = $(this); 79 obj.bind(options.event, function(eventObj) { 80 delayImpl(eventObj); 81 }); 82 }); 83 }; 84})(jQuery); 85 86
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.