Home html drop-down fully text HTML

drop-down fully text HTML

Author

Date

Category

I have a text that is initially seen not completely, you need to see the entire text and vice versa when pressing the “show completely” button.

type so:

text text text text
text text text text
text text text text
text text text text

Show completely and after:

text text text text
text text text text
text text text text
text text text text

the rest of the text hide


Answer 1, Authority 100%

Weight options, look towards jQuery slide toggle (http://www.w3schools.com/jquery/eff_slidetoggle.asp ).

And for the most entertaining, there is an option on pure CSS without scripts: http://jsfiddle.net/o3na69ar/1/


Answer 2, Authority 50%

can, in principle, write to yourself, if you decide on the logic of the script, it is not very difficult.

And if knowledge in JS is not enough and just reluctant to write a bicycle that you have done before you, you can use some plugin, for example, jQuery collapser . See the demo of this plugin with various conditions for circumcision text, you can here is here .

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions