[jQuery] Re: click function
I am not exactly sure what you are doing with the positioning, but try .toggle() instead perhaps? Cheers On Dec 15, 11:13 am, Alfredo Alessandrini alfreal...@gmail.com wrote: I've a simple question.. I'm writing a function that call an event on first mouse click and call another event on second mouse click. But I've some problem, because work only the first mouse click: jQuery(document).ready(function() { $(.menu a).click(function() { $(this).next(em).animate({opacity: show, top: -205}, slow); $(this).next(em).animate({opacity: hide, top: -205}, fast); }); }); Any help.. :-) Thanks in advance, Alfredo
[jQuery] What I am I doing wrong? This should be quick.
// when the mouse is hovering over the category link $(#menu li a[id]).hover(function(){ // hide the default image and description $(.js_off).fadeOut(fast); // display the slide show section whose class matches the category link's id var cat=$(this).attr('id'); $(div.slideshow.+ cat +.ns).fadeIn(fast); // when the mouse leaves that category link },function(){ //hide the class $(.slideshow).fadeOut(fast); // display the default image $(.js_off).fadeIn(fast); }); The JS Debugger does not return any errors and everything works, except the cycle plugin, which returns no error. I am expecting the corresponding slide show to appear, but no luck.