1
나는 http://blog.jeremymartin.name/2008/02/jtruncate-in-action.html을 (를) 찾고있었습니다. 페이지로드 후 html이 페이지에 추가 된 경우 작동하지 않는 것 같습니다.jTruncate/live()
누구나 어떻게 작동하는지 또는 더 나은 해결책이 있는지 알고 있습니까?
나는 http://blog.jeremymartin.name/2008/02/jtruncate-in-action.html을 (를) 찾고있었습니다. 페이지로드 후 html이 페이지에 추가 된 경우 작동하지 않는 것 같습니다.jTruncate/live()
누구나 어떻게 작동하는지 또는 더 나은 해결책이 있는지 알고 있습니까?
문제에 대한 가장 간단한 해결 방법은 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);
}
});
오늘 시도해 보겠습니다. –