I looked through some similar questions, but I searched for eternity and was not lucky to find an implementation that is just like what I'm looking for.
It is 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 am looking for this to disappear and it will be absolutely positioned on the page (don't worry, I can handle CSS). I just DO NOT want the slide effect. Just fade away.
It seems to me that this code should work, but it is not: (
$(document).ready(function(){
$(".contact_box").hide();
$('a.contacttoggle').click(function() {
$(this).next("div").find(".contact_box").toggle(400);
return false;
});
})
source
share