defiler de droite vers la gauche au lieu de bas en haut
bonjour à tous
avec ce code, cela me permet (entre autre) de faire defiler des images de bas vers le haut
mais 'jaimerai le faire de droite vers la gauche
voici le code js
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
| function clip() {
// width of the banner container
var contWidth = 134;
// height of the banner container
var contHeight = 227;
var id1 = document.getElementById('slideA');
var id2 = document.getElementById('slideB');
var height = id1.offsetHeight;
id1.style.top = parseInt(id1.style.top)-1 + 'px';
document.getElementById('slideCont').style.height = contHeight + "px";
document.getElementById('slideCont').style.clip = 'rect(auto,'+ contWidth +'px,' + contHeight +'px,auto)';
id2.style.display = '';
if(parseFloat(id1.style.top) == -(height/2)) {
id1.style.top = '0px';
}
setTimeout(clip,50)
}
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
}
}
}
addLoadEvent(function() {
clip();
}); |
si quelqu'un pouvait m' aider se serait vraiment sympa, vraiment car je galère vraiment :(
merci...