Jump to content
  • 0

спойлер


Alex01
 Share

Question

Надо сделать спойлер, и что то не могу найти нигде, как сделать, вернее громоздкие скрипты, и не работает, только дёргается текст. Подскажите, пожалуйста нормальный скрипт, попроще, и как сделать, чтобы он открывался сразу после кнопки, а последующий текст (после спойлера) сдвигался вниз?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

http://jsfiddle.net/4GrWE/2/

На чистом JS? Ну вот что-то набросал по быстрому. Код страшненький, но, пока как умеем, так и пишем) В ИЕ работает, но на JSfidle не хочет, но это проблема jsfidla.

Листинг html:

блок с классом spoiler в нем два тега <p>. верхний как шапка и кнопка, нижний тело, js ему добавляет классы hide/show их нужно стилизовать.

Edited by zSpx
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy