【发布时间】:2011-09-22 11:19:50
【问题描述】:
如果项目描述太长,通常会使用子字符串,
但怎么能显示回来呢?
我在想
if string length is > x
insert after position x a <span classs="more"> //probably i'd do this through php
insert at the end of the string </span>
hide ".more" //css & javascript to hide and show
然后你可以简单地使用类似的技术:toogle parent's element with parent
你有什么替代方案吗?
【问题讨论】:
-
似乎是一个很好的解决方案
标签: php javascript css