开发者

Javascript Accordion

I have a strange bug I cant quite figure out, I've built an accordion slider that shows short content intially and when clicked then shows the long content.

At any one time only 1 tab should be open but when 2 opens the short content dissapears.

ive attached a fiddle, can anybody see whats wrong? Is 开发者_StackOverflowit because they all shgare the same class?

http://jsfiddle.net/2v44c/


Here's what I came up with.

Simplified the JS a little bit and added 1 line of CSS to help with hiding the short content.

http://jsfiddle.net/2v44c/2/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜