Admin Admin
Posts : 76 Points : 119 Reputation : 6 Join date : 2009-07-20 Age : 31 Location : Manila
| Subject: Elastic Primary Picture Tue Jul 28, 2009 2:38 am | |
| Now you can play with your primary Picture Preview: soon to update Heres the code: - Code:
-
$$('div.imgblock200').each(function (elm) { var fx = new Fx.Styles(elm, { transition: Fx.Transitions.Elastic.easeOut, duration: 1000, wait: false }); elm.setHTML(elm.innerHTML.replace(/(<a href="[\S]*?")/g, "<a")).addEvents({ 'mousedown': function (e) { e = new Event(e).stop(); this.setOpacity(0); var clone = this.clone().setStyles(this.getCoordinates()).setStyles({ 'cursor': 'move', 'zIndex': 50000 }).addEvent('emptydrop', function () { this.remove(); elm.setOpacity(1); fx.start({ 'margin': [50, 0] }); }).setOpacity(0.5).inject(document.body); var drag = clone.makeDraggable(elm); drag.start(e); }, 'mouseenter': function () { this.setStyle('cursor', 'move'); } }); }); put it on your .js(javascript) File. credits: Heinz | |
|