Open ds-1010 opened 11 years ago
var resultsPage = "http://10.14.191.153/snmp/bkgsearch2.php?query="; var terms = ''; $(document).ready(function(){ $("#srcc").keyup(function(event){ if(event.keyCode == 13){ $("#srcbtn").click(); } }); $('#menu').load('menu.html'); $('#srcbtn').click(function(){ terms = $('#srcc').val(); if(terms !== ''){ var loadPage = resultsPage.concat(terms); $('#resultwrapper').load(loadPage,function(){ //$('#resultwrapper').removeHighlight(); //$('#resultwrapper').highlight(terms); $('#trunk').trunk8({lines:2, fill: '… read more '}); $('#read-more').live('click',function (event){ $(this).parent().trunk8('revert').append(' read less'); return false; }); $('#read-less').live('click',function (event){ $(this).parent().trunk8(); return false; }); }); } }); });
It appears i'm having the same issue as you. Execept it'll truncate the first elelment on my page.
Hi dsys,
Are you sure there are no errors? It works for me if I call the Trunk8 function after the content is succesfully appended. This code works flawlessly for me:
function loadMore() {
$.ajax({
url: "loadmore.php",
success: function(html){
$(".content").append(html);
$(".trunk8").trunk8();
}
});
return false;
}
My content is in a span which sits in a table cell. The span has the trunk8 class.
Hi! I have faced with strange problem. If i use trunk8 in $.ajax call, for example
nothing happens. Text not truncated.
But if i call for example
all works fine. Could you explain me such behavior.
Thank you in advance.