Skip to content

Instantly share code, notes, and snippets.

@ornerymoose
Created May 1, 2012 23:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ornerymoose/2572328 to your computer and use it in GitHub Desktop.
Save ornerymoose/2572328 to your computer and use it in GitHub Desktop.
Doing the opposite of what I want it to do
//the text should initially be hidden, then when you click the link, it should show the text.
//weird thing is: for another section of the website, it works just fine. Thoughts?
//this is the one that works fine:
$("#about.faq .question h3 a").click(function(event){
event.preventDefault();
$(this).parents(".question").children(".answer").slideToggle(100);
$(this).toggleClass("active");
});
//this is the one that does the opposite
$("#about.static .question h3 a").click(function(event){
event.preventDefault();
$(this).parents(".question").children(".answer").slideToggle(100);
$(this).toggleClass("active");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment