How to apply dotdotdot for multiple line content in jquery?
Snippet Code
Rate this page :
[ 0 votes]
Jquery dotdotdot code given below is used to write multiple line content. Here, the repeated content of demo1 will be displayed as dotdotdot format. In this code we have applied dotdotdot effect to the demo1 div.
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script src='http://dotdotdot.frebsite.nl/js/jquery.dotdotdot-1.2.1.js'></script>
<script>
$(function() {
$("#demo1").dotdotdot({wrap: 'letter'});
});
</script>
<div id="demo1">We welcome you to Hscripts.com. Praised as the best free webmaster resources online, by our users. </div>
<div id="demo2">We welcome you to Hscripts.com. Praised as the best free webmaster resources online, by our users. </div>
<style>
div {
width: 150px;
height: 20px;
}
</style>