Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Jeremy Breit
14,626 PointsMaking one function for unique JQuiry
http://jsfiddle.net/JustaBreitGuy/nT7nA/
I am trying to take the two jquiry functions and a function for the unique "test" inputs.
If anyone knows how to help, I'd appreciate. http://jsfiddle.net/JustaBreitGuy/nT7nA/
$('#link').click(function () { $('.link').removeClass("active"); $('.sub').slideUp(); $('#submenu2').delay(501).slideDown(); $('.test').fadeOut(); $('#test2').delay(501).fadeIn(); $('#link').addClass("active"); });
$('#link2').click(function () { $('.link').removeClass("active"); $('.sub').slideUp(); $('#submenu').delay(501).slideDown(); $('.test').fadeOut(); $('#test1').delay(501).fadeIn(); $('#link2').addClass("active"); });
1 Answer
Andrew Chalkley
Treehouse Guest TeacherCan you explain in more detail what you're trying to do? Then someone may be able to point you in the right direction.