Closed mikemoser closed 12 years ago
I set display:none of the .truncate class and then:
$('.truncate').expander({ onSlice: function() { $(this).show(); } });
Excellent suggestion, @KirilAngov.
@mikemoser: I'd further recommend that you make sure display: none
is only applied to the truncate class if JavaScript is enabled. To do so, if you're not already using Modernizr, reference a <script>
in the <head>
that has this line in it:
document.documentElement.className += ' js';
Then, in your CSS, do this:
.js .truncate {
display: none;
}
Read this blog post for more information about js-only style rules.
This is exactly how we use it, with .js and Modernizr but did not want to overcomplicate the comment/solution. Thanks for your work @kswedberg!
Excellent! I suspected so. And you're welcome. I'm happy to be able to share my work.
Great plugin, thanks!
I've notice on mobile (iOS and Droid) that the full text shows for a split second, then it collapses to "see more". Is there a way to avoid this?
Thanks, -mm