javascript - How to apply jquery ellipsis to div -
$('.more2').each(function() { var showchar = 150; var content = $(this).html(); if(content.length > showchar) { var c = content.substr(0, showchar); var h = content.substr(showchar, content.length - showchar); var html = c + '<span class="moreellipses">' + ellipsestext+ ' </span><span class="morecontent"><span>' + h + '</span> <a href="" class="morelink">' + moretext + '</a></span>'; $(this).html(html); } }); i trying build jquery accordion effect div drop down; please see example jsfiddle . here want it's on-clicking of ('+') button want show reaming part of content. @ time else div in same row should take same height active div taken don't want show content in inactive div. try adding document ready: $('a.morelink').click(function(){ $(...