1// JavaScript Document 2 /*===================================================== 3meta: { 4 title: "jquery-opacity-rollover.js", 5 version: "2.1", 6 copy: "copyright 2009 h2ham ([email protected])", 7 license: "MIT License(http://www.opensource.org/licenses/mit-license.php)", 8 author: "THE HAM MEDIA - http://h2ham.seesaa.net/", 9 date: "2009-07-21" 10 modify: "2009-07-23" 11} 12=====================================================*/ 13(function($) { 14 15 $.fn.opOver = function(op,oa,durationp,durationa){ 16 17 var c = { 18 op:op? op:1.0, 19 oa:oa? oa:0.6, 20 durationp:durationp? durationp:'fast', 21 durationa:durationa? durationa:'fast' 22 }; 23 24 25 $(this).each(function(){ 26 $(this).css({ 27 opacity: c.op, 28 filter: "alpha(opacity="+c.op*100+")" 29 }).hover(function(){ 30 $(this).fadeTo(c.durationp,c.oa); 31 },function(){ 32 $(this).fadeTo(c.durationa,c.op); 33 }) 34 }); 35 }, 36 37 $.fn.wink = function(durationp,op,oa){ 38 39 var c = { 40 durationp:durationp? durationp:'slow', 41 op:op? op:1.0, 42 oa:oa? oa:0.2 43 }; 44 45 $(this).each(function(){ 46 $(this) .css({ 47 opacity: c.op, 48 filter: "alpha(opacity="+c.op*100+")" 49 }).hover(function(){ 50 $(this).css({ 51 opacity: c.oa, 52 filter: "alpha(opacity="+c.oa*100+")" 53 }); 54 $(this).fadeTo(c.durationp,c.op); 55 },function(){ 56 $(this).css({ 57 opacity: c.op, 58 filter: "alpha(opacity="+c.op*100+")" 59 }); 60 }) 61 }); 62 } 63 64})(jQuery); 65
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.