![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
01/03/2011, 13:15
|
![Avatar de alfoner](http://static.forosdelweb.com/customavatars/avatar297204_1.gif) | | | Fecha de Ingreso: abril-2009
Mensajes: 146
Antigüedad: 15 años, 10 meses Puntos: 0 | |
aplicar sonido a script como podria ponerle un sonido a esta funcion cuando el scroll se dirija al fondo del div
function loadLog(){
var oldscrollHeight = $("#chatbox").attr("scrollHeight") - 20;
$.ajax({
url: "mercadillos/<?php echo $dni; ?>/log.html",
cache: false,
success: function(html){
$("#chatbox").html(html); //Insert chat log into the #chatbox div
var newscrollHeight = $("#chatbox").attr("scrollHeight") - 20;
if(newscrollHeight > oldscrollHeight){
$("#chatbox").animate({ scrollTop: newscrollHeight }, "normal"); //Autoscroll to bottom of div
}
},
});
}
setInterval (loadLog, 2500); |