Update: looks like the issue is related to the function hover: if I change it with click I don't get the error but I want to use hover instead click
Thanks for any help. On Mar 30, 1:16 am, macsig <sigbac...@gmail.com> wrote: > Hello guys, > I'm trying to create an horizontal accordion using the code below: > > $(document).ready(function(){ > lastBlock = $("#a1"); > maxWidth = 210; > minWidth = 75; > > $(".accordion_trigger").hover(function(){ > $(lastBlock).animate({width: minWidth+"px"}, { queue:false, > duration:400 }); > $(this).animate({width: maxWidth+"px"}, { queue:false, duration: > 400}); > lastBlock = this; > } > ); > > }); > > with the following HTML: > > <ul class="accordion"> > <li> > <span id="a1" class="accordion_trigger"> > <img src="images/free_thumb.jpg" /> > <p> > <strong>Freebies</strong><br/> > Download free files to make your job easier. > </p> > </span> > </li> > <li> > <span class="accordion_trigger"> > <img src="images/tut_thumb.jpg" /> > <p> > <strong>Tutorials</strong><br/> > Tips and tricks to help you > keep up with the latest technology. > </p> > </span> > </li> > <li> > <span class="accordion_trigger"> > <img src="images/inspire_thumb.jpg" /> > <p> > <strong>Inspiration</strong><br/> > Get inspired by what other designers are doing. > </p> > </span> > </li> > </ul> > > The effect works well but I get this error: > > handler is undefinedhttp://localhost:3000/javascripts/jquery.js?1236564794 > Line 25 > > Any idea about the reason I get it? > > I'm using some other scripts and plug-ins. Can it be a conflict issue? > > Thanks and have a nice day