开发者

Javascript Accordion

开发者 https://www.devze.com 2023-04-04 09:08 出处:网络
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.

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

精彩评论

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