Tuesday 20 December 2011

jquery dotdotdot example


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 type=”text/javascript” language=”javascript” src=”jquery.dotdotdot-1.2.1.js“></script>
<script type="text/javascript">
$(function(){
$(‘.ellipsis, .ellipsis-e’).dotdotdot();
$(‘.ellipsis-r’).dotdotdot({
watch: ‘window’
});
$(‘.ellipsis-a’).dotdotdot({
after: ‘a’
});
});
</script>


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

No comments:

Post a Comment