Adjusting length of string when clicked: jQuery
<p>How do I <strong>adjust the length of a string</strong> when I've clicked on it?
Without complicating the entire code.</p>

<p>Something like strlen in php would be the solution.</p>

<p>See: // This</p>

<pre><code>var toggleState = true;
$(document).ready(function() {
    $('.more').on("click", function() {
        if(toggleState) {
            $(this).length(unlimited characters); // This
        } else {
            $(this).length(100 characters); // This
        }
        toggleState = !toggleState;
    });
});
</code></pre>

<p>.length(unlimited characters) is just so that you understand what I mean/what I want to do. I need a solution, doesnt have to be length();</p>
