Sorry I expressed myself badly ... What I mean is how to implement the click function on my menu?
thanks On 13 Out, 23:38, rob <rob.sche...@gmail.com> wrote: > try taking the numbers out of the parentheses.... like this: > > .animate({ backgroundPosition: "0px 0px",},{duration:400}) > > On Oct 13, 2:45 pm, vicix <pedro.vi...@gmail.com> wrote: > > > hi, > > > i build a menu with a background position animation plugin by Jonathan > > Snook’s. > > The mouseover and mouseout are correct, but i dont't know to put when > > click to stop animation and dont run a onmouseout action. > > > the code: > > > -------------------------------------------------------------------- > > > HTML > > > <div id="menu"> > > <ul> > > <li><a href="#" class="menu">Empresa</a></li> > > <li><a href="#" class="menu">Pvc & Alu</a></li> > > <li><a href="#" class="menu">Produtos</a></li> > > <li><a href="#" class="menu">Eventos</a></li> > > <li><a href="#" class="menu">Contactos</a></li> > > </ul> > > </div> > > > JAVASCRIPT (jquery) > > > $('#menu a.menu') > > .css( {backgroundPosition: "0 40px"} ) > > .mouseover(function(){ > > $(this).stop().animate( > > {backgroundPosition:"(0 0)"}, > > {duration:300}) > > }) > > .mouseout(function(){ > > $(this).stop().animate( > > {backgroundPosition:"(0 40px)"}, > > {duration:300}) > > }) > > > -------------------------------------------------------------------- > > > Can someone help me? > > > thanks > > > (Sorry my english)