If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

I've tried everything I could and it doesn't work. What I need is to able to slide a div when someone click on the menu, however if you have something "opened" it should close before show the next content. Does it make sense??

This really looks like another case of "javascript for nothing" in modern browsers, and a slew of redundant jQuery nonsense as well. The only reason there should be any JS is for legacy browsers, or to help with letting CSS3 do the animations for you (since FF and chrome are re-re's about resizing to height or width:auto)

Though the other thing wrong is trying to stuff multiple pages into a mess of inaccessible scripting all to avoid those "evil pageloads" -- replicating fieldset behavior with JS is NOT good coding or accessible design -- it's scripting for nothing and just making the page harder to use.

That said, if you REALLY insist on doing this, the answer is :target for modern browsers, with a scripting fallback for IE9/earlier. (since IE9 also can't do transitions).

Is unlocked for access to the gooey bits. Because the scripting is inside IE conditionals the IE9/earlier scripting will only work in REAL IE9/earlier, and not IE 11's emulation mode.

Works well in all modern browsers and IE 10/newer WITHOUT resorting to JavaScript or any silly library like jQuery. The polyfill I wrote for IE9/earlier appears to run properly all the way back to IE 5.5, though naturally the scripted animation is jerky compared to the native CSS3 equivalent thanks to JS' crummy timer resolution. That too doesn't rely on any fat bloated library, and since it auto-attaches itself so long as your #mainMenu anchors point at a valid ID on the page, they'll automatically be added so you don't have to target each one manually.

Fun, huh?

-- edit -- oops, forgot to snag the 'close' buttons in the polyfill. Heading for some grub, but I'll try to address that afterwards since it's a nice lazy hazy summer sunday afternoon.