jScrollPane Trouble
Eu usei o jScrollPane no meu site. Também estou usando o ajax para atualizar os dados na mesma div em que o jScrollPane é usado. Agora, quando anexo os dados retornados à div, a barra de rolagem não fica visível no texto anexado. Pode porque a função jQuery é chamada quando o documento é carregado, mas agora alguma idéia para resolver esse problema? Eu li o artigo aqui aquihttp: //jscrollpane.kelvinluck.com/auto_reinitialise.htm mas não estou conseguindo resolver esse problema. Aqui está o código:
function scrollfunction($value){
var ajaxRequest; // The variable that makes Ajax possible!
try{
// Opera 8.0+, Firefox, Safari
ajaxRequest = new XMLHttpRequest();
} catch (e){
// Internet Explorer Browsers
try{
ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try{
ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e){
// Something went wrong
alert("Your browser broke!");
return false;
}
}
}
// Create a function that will receive data sent from the server
ajaxRequest.onreadystatechange = function(){
if(ajaxRequest.readyState == 4){
$(ajaxRequest.responseText).appendTo(".div1");
}
}
ajaxRequest.open("GET", "process.php" , true);
ajaxRequest.send(null);
}
$("document").ready(function() {
$(".div1").jScrollPane();
});