I display the div by clicking the link, but now I want to hide it when it is clicked again.
This is what I have currently:
$(document).ready(function() {
$('#our-future-intro-slide').click(function() {
//$(".our-future-intro").delay(2400).slideDown(3600);
$(".our-future-intro").slideDown(200);
});
});
So each time the user selects the link, it will either slide down and display the div, or slide up and disappear (or just disappear), depending on the current state.
UPDATE: I got it working, thanks to slideToggle, now I want to know if I can break this down to be less code.
I am setting slidetoggle to 4 different parts of the page, each div has its own id.
Here is the code:
$(document).ready(function() {
$('#our-future-intro-slide').click(function() {
//$(".our-future-intro").delay(2400).slideDown(3600);
$(".our-future-intro").slideToggle(200);
});
$('#strategic-planning-click').click(function() {
$("#strategic-planning").slideToggle(200);
});
$('#student-learning-click').click(function() {
$("#student-learning").slideToggle(200);
});
$('#institutional-assessment-click').click(function() {
$("#institutional-assessment").slideToggle(200);
});
});
Any help is appreciated.