问题
Everyone, I am trying to do read more feature with JQuery's slideToggle thing but the problem is as read more feature normally there is a little text shown on the page and when the user clicks on read more link,button etc. the panel slides downwards and shows the rest of the text but with slideToggle I can't see any start point or something to show first couple of lines before sliding panel. The data is retrieved from database so it's dynamic.
I hope I can describe the problem :( so could some one show me a way to do it with jquery.
Thanks in advance...
回答1:
Actually I've found something better :)
jQuery Expander Plugin
http://plugins.learningjquery.com/expander/index.html#getting-started
回答2:
You're need to separate the preview content from the readmore content. This can be done either manually if you have a static html page, or dynamically during page generation if you are using a server side scripting language (.net, php, etc). Basically the preview content needs to be outside of which ever element (probably a DIV) the slideToggle function is being used on.
来源:https://stackoverflow.com/questions/1249804/read-more-feature-with-jquery-slidetoggle-method