jQuery beginner here.
I’m working on a site with with two links. Each link slides out content a div with content below. The problem I’m having is that I can’t figure out how to toggle between both when the user clicks the other link.
So when the user clicks LINK-A it slides out CONTENT-A, while CONTENT-A is showing if the user clicks LINK-B CONTENT-A should slide back before CONTENT-B slides out.
Hope this makes sense, really hope someone can help me!
HTML–
CSS–
Each
contentdiv is absolutely positioned inside of thecontainerdiv so it can be animated in and out of view:JS–
Here is a demo: http://jsfiddle.net/4eN84/