Ow! Thank you very much for helping me!! :))
So yup it's working but... mmhhh... the thing I wanted to do on each
LI react really bad and gives me such a hard time... maybe you could
give me a tips (or two ^^) in order to make it working as a charm ^^.
So, what I'm working on is a mouseOver reaction on each LI. What I
want is:
- clone the entire LI
- put that cloned LI over the original one
- puff (with scriptaculo) the clone
That sound easy but... heh... that's not that easy for me.
What I tried:
html:
<div id="puffy" name="puffy">
</div>
<ul id="menu">
<li class="item"><a href="">Accueil</a>
<li class="item23"><a href="">Programmes</a>
<li class="item22"><a href="">A l'affiche</a>
<li class="item12"><a href="">Débats</a>
<li class="item6"><a href="">Intervenants</a>
<li class="item2"><a href="">Infos-Pratiques</a>
</ul>
then my script (thanks to your help :)):
function bindage()
{
var monX = 0;
var monY = 0;
new Draggable('puffy');
$('menu').select('li').invoke('observe', 'mouseover',
bindage_liover);
function bindage_liover(event)
{
event.stop();
var clone = this.cloneNode(true);
$('puffy').innerHTML = clone.innerHTML;
monX = Event.pointerX(event);
monY = Event.pointerY(event);
new Effect.Move('puffy', {duration: 0, x: monX -40, y: monY -
15,
mode: 'absolute'});
$('puffy').show();
new Effect.Puff('puffy');
}
}
Event.observe(window, 'load', bindage);
But when I mouseOver the LI it works for first and then it make a
strange thing like moving the font-size or the position to some
unbelievable values...
Maybe am I trying to do it in a strange way, I may assume there is a
simplier way to do it but my brain's burned out ^^.
Maybe you could help me (again? ^^)
Thanks.
JF.
--
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.