0
ajax를 사용한 후에 jScrollPane을 다시로드하는 데 문제가 있습니다. 이 문제는 많이 묻는 것 같지만, 아직 (시간을 들인 후) 알아 내지 못했습니다. 내가 JScrollPane의를 reintitialising거야하지만 그래서 여전히 DIV의 콘텐츠 후 오지 않는 아약스에 의해 대체되고있는jScrollPane with Ajax
function search(str) {
var xmlhttp;
if (window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();
}
else {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
document.getElementById("searchresult").innerHTML = xmlhttp.responseText;
document.getElementById("searchresult").style.display = "inline";
$('.searchresult').jScrollPane({autoReinitialise: true});
}
}
xmlhttp.open("POST", "ajax/search.php", true);
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp.send("q=" + str);
}
:
그래서 여기 내 자바 스크립트 코드입니다.
모든 솔루션?