Right now I have a basic template built to allow me to toggle sliding 4 different divs into a frame
here is the site – try clicking the eyes, nose, or forehead
as you can see a div slides into the frame but,
now I want to add the functionality to slide the center div out when one of the div’s slide in (so if the top div slides in the div on the screen will slide down and if the left div slides in the screen will slide right, etc)
any way to make this happen? I think it would have a great effect with the transitioned background
thanks everyone
katie
What you need to do is absolutely position your content div within a fixed center div. This will allow you to move around your content div, relative to the center of the page. I am using css-transitions to apply the slide effect. So the sliding will only work in modern browsers, but it degrades nicely to outdated IE browsers.
Here’s the fiddle with a working demo: http://jsfiddle.net/WVPDH/263/
You will obviously need to modify this code some to work with your page, but it shouldn’t be all too difficult to do so.
I’ve posted the code below in case the fiddle link goes sour:
HTML:
CSS:
JS: