我有一个带有文本“点击我”的 div
和带有有限视图文本选项的“P”标签。jquery 有什么方法可以单击“单击我”并展开文本。并再次单击我隐藏。对不起,我不擅长 jQuery。没有找到路。
查看现场演示 js Fiddle:http: //jsfiddle.net/saifrahu28/7wKyj/
**HTML**
<div>Click me</div>
<p>
It is a long established fact that a reader
will be distracted by the readable content of a
page when looking at its layout. The point of using Lorem Ipsum
is that it has a more-or-less normal distribution of letters,
as opposed to using 'Content here, content here',
making it look like readable English. Many desktop publishing
<p>
CSS
p{
overflow: hidden;
text-overflow: ellipsis;
display: block;
white-space: nowrap;
width:100px;
}
如果可以,那就太好了。