Trying to open/close a div with the direction arrow changing on open and close but staying attached to the div as it closes and opens.
http://jsfiddle.net/siiimple/GqJj8/8/
Ideally I would like it to slide to the left as it closes (fast), then open to the right. The close “-” would change to “+” when it closed.
Thanks for any help 🙂
Departed from crowjonah’s solution, and came up with something that I think is closer to your spec.
Check it out here:
http://jsfiddle.net/VLNDL/
First, restructured the divs a little so that the expand/contract buttons is a peer of the sliding div; so that it stays atatched to it during the transition:
Then refactored the CSS to: 1. make it a little simpler, 2: change around block, relative, float, and absolute so that the buttons are “pinned” to the relative div, and that’s it:
The only thing I changed in the js is that I disabled the opacity animation, but you could bring it back — I just wouldn’t target #intro-wrap with it, you should instead target contentWrap with it:
J