this must be the most discussed and problem-prone Class on this list... pretty sure you can find some solution on another discussion. ----------- אריה גלזר 052-5348-561 5561
On Mon, May 3, 2010 at 15:22, hamburger <[email protected]> wrote: > Hello in my code the function > Hints.detach(li_element); > destroys the detached element (here:li_element) not the Hints. > > is this the way of meaning? > > How to destroy the showed Tip-element? > > my code: > var li_element = new Element('li', { > 'id': bildID, > 'class': 'complain', > 'html': complaintext + '<br /><span > class="time">I do not > want this ...</span>' > }).adopt( > new Element('img', { > 'class': 'complain-remove', > src: > 'images/investor_close.gif', > title: 'click to remove.', > events: { > click: function() { > > Hints.detach(li_element); //Tip > delete > li_element.dispose(); > } > } > }) > ).inject('complainContainer','top'); > > > and for tips: > > var Hints = new Tips({ > showDelay: 100, > hideDelay: 10, > offset: { > 'x': -60, > 'y': -130 > }, > fixed: true, > className: 'david_tip', > onShow: function(tip,el) { > tip.fade('in'); > }, > onHide: function(tip,el) { > tip.fade('out'); > }, > onDetach:function(tip,el) { > alert("detached"); > //tip.fade('out'); //something wrong here > //tip.setStyle('display', 'none'); > } > }); > >
