funcion que se repite
quiero que mientas tengo onMouseDown, se mueva un texto y cuando lo suelte pare de moverse. Tengo un codigo
function moverAbajo() {
var a = document.getElementById('panelLectura').style.top;
a = a.substring(0, a.length - 2);
a = new Number(a);
var l = document.getElementById('panelLectura').clientHeight;
if (l + a > 414) {
var c = a - 5;
document.getElementById('panelLectura').style.top = c;
}
}
este texto mueve abajo el texto que yo quiero pero solo lo mueve un poquito, como podrÃa poner un buble infinito de movimiento hasta que la tecla se soltara¿?
Muchas gracias, salu2 :)
function moverAbajo() {
var a = document.getElementById('panelLectura').style.top;
a = a.substring(0, a.length - 2);
a = new Number(a);
var l = document.getElementById('panelLectura').clientHeight;
if (l + a > 414) {
var c = a - 5;
document.getElementById('panelLectura').style.top = c;
}
}
este texto mueve abajo el texto que yo quiero pero solo lo mueve un poquito, como podrÃa poner un buble infinito de movimiento hasta que la tecla se soltara¿?
Muchas gracias, salu2 :)
