Jquery Read More Toggle

六月ゝ 毕业季﹏ 提交于 2020-01-25 07:11:09

问题


Im looking to add a 'read more' toggle button to a HTML website, everything i've found either only works in one or two browsers or isnt quite what im looking for.

I simply want to have a paragraph of text with 'read more' underneith, when clicked the 'read more' changes to 'read less' and the div expands to show all of the text. It also need to be able to contain more than one <p> and a list.

Would be great if it was animated to show a smooth scroll and if possible would show a certain amount of characters before the 'read more' rather than a div height.

Can anyone help? Thanks in advance!


回答1:


You can use READMORE.JS, responsive jQuery plugin for collapsing and expanding long blocks of text with "Read more" and "Close" links




回答2:


This example may help you for Read More/Less Toggle.

......


来源:https://stackoverflow.com/questions/34926435/jquery-read-more-toggle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!