I didn't actually do any testing but looking at your code have you tried closing your a tag?
On Sat, Sep 13, 2008 at 11:49 PM, jon <[EMAIL PROTECTED]> wrote: > > I am cloning a link that has an image inside, then set position > absolute (with top left styles too) on the cloned link, but for some > reason, the cloned link is not at the exact position as the old > one(off in the y direction). > if I'm doing the same thing on an image or a div, then it's fine... > what's special about the link? > > <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" > "http://www.w3.org/TR/html4/strict.dtd"> > <html> > <head> > <title></title> > <meta http-equiv="Content-Type" content="text/html; > charset=iso-8859-1"> > <meta http-equiv="Content-Style-Type" content="text/css"> > <meta http-equiv="Content-Script-Type" content="text/javascript"> > > > > <script language="javascript" type="text/javascript" src="includes/ > javascript/mootools-1.2-core-nc.js"></script> > <script language="javascript" type="text/javascript" src="includes/ > javascript/mootools-1.2-more.js"></script> > > > <script type="text/javascript"> > window.addEvent('domready',function(){ > > var drop = $('drop'); > > > $$('.draggable').each(function(item){ > item.addEvent('mousedown', function(e){ > //e=new Event(e).stop(); > var coord=this.getPosition(); > var clone = > this.retrieve('clone',this.clone()); > > clone.setStyles({left:coord.x,top:coord.y,'opacity': > 0.7,'position':'absolute'}) > > .inject(document.body).makeDraggable({ > droppables:[drop], > snap: 0, > onSnap: function(el){ > > }, > onEnter: function(el, droppable){ > //var myEffect = new > Fx.Tween(droppable); > > //droppable.get('highlight').start('#DDFFFF', '#CCCCCC'); > > > droppable.get('tween').start('background-color', '#DDFFFF', > '#CCCCCC'); > }, > onDrop:function(el, droppable){ > if(droppable){ > > el.dispose(); > }else{ > > el.get('morph').start({ > > opacity:0, > > left:coord.x, > > top:coord.y > > }).chain(el.dispose.bind(el)); > > } > } > }).start(e); > }); > }); > }); > </script> > > </head> > <body> > <a class="draggable" href="test.php"> > <img src="images/mymage.jpg"/> > </div> > <div id="drop" style="height:100px;width:100px;background- > color:#99CC99;"> > </div> > > > </body> > </html> >
