Note that there are some explanatory texts on larger screens.

plurals
  1. POdot dot dot JS plugin dont work
    text
    copied!<p>I want to use dotdotdot JS plugin on my Django site, but it doesnt work for me. why? I just want to element to have dotdotdot on the end This is HTML head:</p> <pre><code>&lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" language="javascript" src="/static/mainpage/dotdotdot-1.6.5/jquery.dotdotdot.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" language="javascript"&gt; $(document).ready(function() { $("#prispevek").dotdotdot({ /* The HTML to add as ellipsis. */ ellipsis : '... ', /* How to cut off the text/html: 'word'/'letter'/'children' */ wrap : 'word', /* Wrap-option fallback to 'letter' for long words */ fallbackToLetter: true, /* jQuery-selector for the element to keep and put after the ellipsis. */ after : null, /* Whether to update the ellipsis: true/'window' */ watch : false, /* Optionally set a max-height, if null, the height will be measured. */ height : null, /* Deviation for the height-option. */ tolerance : 10, /* Callback function that is fired after the ellipsis is added, receives two parameters: isTruncated(boolean), orgContent(string). */ callback : function( isTruncated, orgContent ) {}, lastCharacter : { /* Remove these characters from the end of the truncated text. */ remove : [ ' ', ',', ';', '.', '!', '?' ], /* Don't add an ellipsis if this array contains the last character of the truncated text. */ noEllipsis : [] } }); }); &lt;/script&gt; </code></pre> <p>This is css:</p> <pre><code>#prispevek { height:80px; /*text-overflow:ellipsis; overflow:hidden;*/ text-align: justify; } </code></pre> <p>this is my body: Content is through Django</p> <pre><code>{% for object in prispevky %} &lt;article&gt; &lt;h1&gt;&lt;a href="novinky/{{ object.id }}/"&gt;{{ object.nadpis }}&lt;/a&gt;&lt;/h1&gt; &lt;p id="prispevek"&gt;{{ object.text|linebreaksbr }}&lt;/p&gt; &lt;/article&gt; {% endfor %} </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload