Ver Mensaje Individual
  #1 (permalink)  
Antiguo 01/03/2011, 13:15
Avatar de alfoner
alfoner
 
Fecha de Ingreso: abril-2009
Mensajes: 146
Antigüedad: 15 años, 1 mes
Puntos: 0
Exclamación 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);