Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
111
rated 0 times [  113] [ 2]  / answers: 1 / hits: 21018  / 13 Years ago, thu, march 17, 2011, 12:00:00

I've browsed some similar questions - but I've been looking forever and no luck finding an implementation that's the same as what I'm looking to do.



It's VERY simple:



<a class=contacttoggle href=#>Contact</a>
<div>Lots of content between</div>
<div>Lots of content between</div>
<div>Lots of content between</div>
<div>Lots of content between</div>
<div class=contact_box>Contact info that is initially hidden and then fades in when the contact_toggle Contact link above is clicked</div>


I'm looking for this to fade in and it will be absolutely positioned on the page (no worries I can handle the CSS). I just DO NOT want a slide effect. Just fade in.



I feel like this code should work but it's not :(



$(document).ready(function(){


/* function to show and hide main navigation conatct box */
$(.contact_box).hide();

$('a.contacttoggle').click(function() {
$(this).next(div).find(.contact_box).toggle(400);
return false;
});


})

More From » jquery

 Answers
14

What about fadeToggle?


[#93238] Tuesday, March 15, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jennie

Total Points: 593
Total Questions: 102
Total Answers: 106

Location: Federated States of Micronesia
Member since Fri, Sep 16, 2022
2 Years ago
;