When using this code:
<script>
$(document).ready(function ()
{
$.getJSON("http://twitter.com/statuses/user_timeline/USERNAME.json?callback=?", function(data) {
if(data[0].text.length > 107)
$(".show_tweet").html(data[0].text.substring(0,107));
else
$(".show_tweet").html(data[0].text);
});
});
</script>
<div class='show_tweet'></div>
What code do I need add so that it adds 3 dots “…” at the end of the text automatically?
1 Answer