I'm trying to make a "More" functionality for comments.
How I'm trying to make it work:
- I split comment in 2 parts - 1st 200 symbols and the rest of the symbols.
- The rest of the symbols are placed in a
<span class="hidden_comment_container" ></span>
which by default getsdisplay:none
- Toggle to show the rest is placed if needed (if comment length > 200 symbols).
This is working more or less fine (jsfiddle demo) but there are 2 problems.
- Upon slidedown,
hidden_comment_container
receivesdisplay:inline-block
and messes up things a bit, since it gets transferred to a new line (check demo to see what I mean) - When sliding down and sliding up, near the end of animation you can notice some twitching.
Can anyone please help me solve these 2 problems?