Rev | Line | |
---|
[6] | 1 | var parts = ["son", "news", "association", "contact", "forum"]; |
---|
| 2 | var current_part = 0; |
---|
| 3 | var RUNNING = true; |
---|
| 4 | |
---|
| 5 | $(document).ready |
---|
| 6 | ( function() |
---|
| 7 | { $(".accueil_block").hover |
---|
| 8 | ( function() |
---|
| 9 | { RUNNING = false; |
---|
| 10 | $("#etoile_" + parts[current_part]).fadeOut(300); |
---|
| 11 | $(this).find(".accueil_info").fadeIn(300); |
---|
| 12 | var id = $(this).get(0).id.substr(7); |
---|
| 13 | $("#etoile" + id).fadeIn(300); |
---|
| 14 | }, |
---|
| 15 | function() |
---|
| 16 | { $(this).find(".accueil_info").fadeOut(300); |
---|
| 17 | var id = $(this).get(0).id.substr(7); |
---|
| 18 | $("#etoile" + id).fadeOut(300); |
---|
| 19 | } |
---|
| 20 | ); |
---|
| 21 | //setTimeout("next_part()", 300); |
---|
| 22 | } |
---|
| 23 | ); |
---|
| 24 | |
---|
| 25 | function next_part() |
---|
| 26 | { if(RUNNING) |
---|
| 27 | { $("#etoile_" + parts[current_part]).fadeOut(450); |
---|
| 28 | current_part++; |
---|
| 29 | if(current_part > 4) current_part = 0; |
---|
| 30 | $("#etoile_" + parts[current_part]).fadeIn(300); |
---|
| 31 | setTimeout("next_part()", 200); |
---|
| 32 | } |
---|
| 33 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.