Документация
на русском v1.2.5 Документацитя по MooTools 1.4.5 Обсуждение Установить себе Благодарности
на русском v1.2.5 Документацитя по MooTools 1.4.5 Обсуждение Установить себе Благодарности
Display a tip on any element with a title and/or href.
<a href="http://mootools.net" title="mootools homepage" class="thisisatooltip" />
var myTips = new Tips('.thisisatooltip');
onShow(tip)
myTips.addEvent('show', function(tip){ tip.fade('in'); });
onHide(tip)
myTips.addEvent('hide', function(tip){ tip.fade('out'); });
Attaches tooltips to elements. Useful to add more elements to a tips instance.
myTips.attach(elements);
myTips.attach('a.thisisatip');
Detaches tooltips from elements. Useful to remove elements from a tips instance.
myTips.detach(elements);
myTips.detach('a.thisisatip');
<div class="options.className"> //the className you pass in options will be assigned here. <div class="tip-top"></div> //useful for styling <div class="tip"> <div class="tip-title"></div> <div class="tip-text"></div> </div> <div class="tip-bottom"></div> //useful for styling </div>
You can also assign tips titles and contents via Element Storage.
<a id="tip1" href="http://mootools.net" title="mootools homepage" class="thisisatooltip" />
$('tip1').store('tip:title', 'custom title for tip 1'); $('tip1').store('tip:text', 'custom text for tip 1');
If you use tips storage you can use elements and / or html as tips title and text.
© Linux.ria.ua, 2008-2024 |