1 2/** 3 * Classe Mootools pour effet MooShake 4 * @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870 5 * http://www.ck-web-creation-alsace.com 6 * http://www.joomlack.fr.nf 7 * @license GNU/GPL 8 * */ 9 10var MooShake_ck = new Class ({ 11 Implements: Options, 12 13 options: { //options par défaut si aucune option utilisateur n'est renseignée 14 mooDuree : 100, 15 decalage : 10 16 }, 17 18 initialize: function(items, options) { 19 this.setOptions(options); 20 var maduree = this.options.mooDuree; 21 var decalage = this.options.decalage; 22 23 items.each(function(item){ 24 25 item.addEvent('mouseover', function(e) { 26 //alert(this.moving); 27 e = new Event(e).stop(); 28 29 var itemCoordinates = this.getCoordinates(); 30 31 var clonetop = itemCoordinates['top']-decalage; 32 var cloneleft = itemCoordinates['left']-decalage; 33 34 var clone = this.clone() 35 .setStyles(itemCoordinates) // this returns an object with left/top/bottom/right, so its perfect 36 .setStyles({ 37 'position': 'absolute' 38 }).inject(document.body); 39 40 this.setStyle('opacity',0); 41 var fx = new Fx.Morph(clone, { 42 duration:maduree, 43 wait:false 44 }); 45 46 fx.start({ 47 'left' : cloneleft 48 }); 49 50 51 52 53 var fx2 = new Fx.Morph(clone, { 54 duration:maduree, 55 wait:false 56 }); 57 var fx3 = new Fx.Morph(clone, { 58 duration:maduree, 59 wait:false 60 }); 61 62 63 animComp = function(){ 64 65 fx2.start({ 66 'left' : itemCoordinates['left']+10 67 }); 68 69 } 70 71 fx.addEvent ('onComplete', animComp.bind(this)); 72 73 animComp2 = function(){ 74 75 fx3.start({ 76 'left' : itemCoordinates['left'] 77 }); 78 } 79 80 fx2.addEvent ('onComplete', animComp2.bind(this)); 81 82 animComp3 = function(){ 83 84 clone.destroy(); 85 this.setStyle('opacity',1); 86 } 87 88 fx3.addEvent ('onComplete', animComp3.bind(this)); 89 90 91 }); 92 93 94 }); 95 96 97 } 98}); 99 100MooShake_ck.implement(new Options); 101 102
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.