Dealing with some missing gaps here, hoping to connect the dots and figure this out.
I'm attempting to create a functionality where a div slides in and out of view each time a button is clicked. Eventually, I want multiple divs to slide out simultaneously. Currently using:
//css
display {visibility:hidden}
Then checking for:
//js$
("#initiate").click( function(event) {
$("#initiate").click( function(event) {
if ($("#nav").is(":hidden")) {
$("#nav").stop().animate({
right: '520px'
}, 1300);
}
else {
$("#nav").stop().animate({
right: '320px'
}, 1300);
}
});
Facing a few issues: 1. Slide only works when visibility is set to something other than "none." 2. Only slides out, doesn't slide back in.
Any suggestions on how I can get this working?