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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
<script type="text/javascript" src="lib/jquery_min-1-4-2.js"></script>
<script type="text/javascript">
$(document).ready(function() {
document.getElementById('but_one').onclick = function() {
document.getElementById('but_one').style.color = '#4d4d4d';
document.getElementById('but_two').style.color = '#b1b1b1';
document.getElementById('but_three').style.color = '#b1b1b1';
$(lstImage).fadeOut("slow");
$("#img_company").fadeIn("slow");
lstImage = "#img_company";
clearInterval(interval);
}
document.getElementById('but_two').onclick = function() {
document.getElementById('but_two').style.color = '#4d4d4d';
document.getElementById('but_three').style.color = '#b1b1b1';
document.getElementById('but_one').style.color = '#b1b1b1';
$(lstImage).fadeOut("slow");
$("#img_employe").fadeIn("slow");
lstImage = "#img_employe";
clearInterval(interval);
}
document.getElementById('but_three').onclick = function() {
document.getElementById('but_three').style.color = '#4d4d4d';
document.getElementById('but_one').style.color = '#b1b1b1';
document.getElementById('but_two').style.color = '#b1b1b1';
$(lstImage).fadeOut("slow");
$("#img_search_job").fadeIn("slow");
lstImage = "#img_search_job";
clearInterval(interval);
}
document.getElementById('but_two').style.color = '#b1b1b1';
document.getElementById('but_three').style.color = '#b1b1b1';
$("#img_employe").hide();
$("#img_search_job").hide();
var nxtImage = "#img_company";
var lstImage = "#img_search_job";
var other = "#img_employe";
var nxtButton= "but_one";
var lstButton= "but_three";
var otherBut = "but_two";
var interval = setInterval(nextImage, 4000);
function nextImage(){
// Définition de la nouvelle image à afficher
$(lstImage).fadeOut("slow");
$(nxtImage).fadeIn("slow");
document.getElementById(lstButton).style.color = '#b1b1b1';
document.getElementById(nxtButton).style.color = '#4d4d4d';
tmp = nxtImage;
nxtImage = other;
other = lstImage;
lstImage = tmp;
tmp = nxtButton;
nxtButton = otherBut;
otherBut = lstButton;
lstButton = tmp;
}
}); |
Partager