JQuery Truncate Text and insert
问题 I am using some Jquery to insert a element before another element as below: $(document).ready(function () { $('a[href*="FolderCTID"]').each(function () { $(this).closest('tr').find('div[class^="ExternalClass"]').before(this); }); }); I am able successfully insert before the element But, .find('div[class^="ExternalClass"]') in the script above is the element i want to truncate before inserting on runtime. Please help me, how i can truncate the text before i actually insert Thanks in advance