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');
}
});