2010-01-23 35 views

回答

1

解決您的問題的最簡單方法是調用由AJAX調用返回的HTML上的構造函數jTruncate。像這樣:

$.ajax(
{ 
    success: function (html) // HTML is returned 
    { 
     // Enable jTruncate on the HTML 
     var truncatedHTML = $(html).jTruncate(/* options */); 

     // Append the HTML to your page 
     $("element to append to").append(truncatedHTML); 
    } 
}); 
+0

我今天就試試這個。 – 2010-01-25 13:43:42