jquery elipsis – dotdotdot plugin

jQuery.dotdotdot is an advanced cross-browser ellipsis for multiple line content. It adds an ellipsis after cut off text to indicate that there is more text than currently visible. Not only on a single line of content, but also particularly on multiple lines of content.

To use add jquery library and script file in header and on document ready call function.
<script type=”text/javascript” language=”javascript” src=”jquery.js“></script>
<script type=”text/javascript” language=”javascript” src=”jquery.dotdotdot-1.2.1.js“></script>

$(function(){
$(‘.ellipsis, .ellipsis-e’).dotdotdot();
$(‘.ellipsis-r’).dotdotdot({
watch: ‘window’
});
$(‘.ellipsis-a’).dotdotdot({
after: ‘a’
});
});

CSS:

.box.box-half {
    float: left;
    width: 295px;
}
.box.box-7 {
    height: 110px;
}
 <div>
          <div style="height: auto; width: auto;">
content goas here...
</div>
</div>

For more details Visit: http://dotdotdot.frebsite.nl/

Share this nice post:

3 thoughts on “jquery elipsis – dotdotdot plugin

Leave a Reply

Your email address will not be published. Required fields are marked *