Guest User

Untitled

a guest
Sep 13th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1.  
  2. $(function(){
  3. // Poisition du contenu par rapport à la gauche
  4.  
  5. $('#content > a').hover(function () {
  6.  
  7. // Animation Fond
  8. $(this).children('span.bg').animate({
  9. 'opacity': '.4'
  10. }, {duration: 1000, queue:false});
  11.  
  12. // Animation Titre
  13. $(this).children('span.title').css('opacity', 0);
  14. $(this).children('span.title').css('display', 'block');
  15. $(this).children('span.title').animate({
  16. 'opacity': 1,
  17. 'top': '60px'
  18. }, {duration: 1000, queue:false})
  19.  
  20. // Animation Description
  21. $(this).children('span.descr').css('opacity', 0);
  22. $(this).children('span.descr').css('display', 'block');
  23. $(this).children('span.descr').animate({
  24. 'opacity': 1,
  25. 'top': '90px'
  26. }, {duration: 1000, queue:false})
  27.  
  28.  
  29. }, function () {
  30.  
  31. // Animation fin Fond
  32. $(this).children('span.bg').animate({
  33. 'opacity': '0'
  34. }, {duration: 1000, queue:false}, function () {
  35. $(this).css('display', 'inline-block')
  36. });
  37.  
  38. // Animation fin Titre
  39. $(this).children('span.title').animate({
  40. 'opacity': 0,
  41. 'top': '20px'
  42. }, {duration: 1000, queue:false})
  43.  
  44. // Animation fin description
  45. $(this).children('span.descr').animate({
  46. 'opacity': 0,
  47. 'top': '20px'
  48. }, {duration: 1000, queue:false})
  49. })
  50. // Lorsque l'on survole un des lien
  51. /*$('#content a').mouseover(function(){
  52. // On vérifie que l'on ne suvole pas l'élément courant
  53. if(current && $(this).index() != current.index()){
  54.  
  55. }
  56. // Si on survol l'éménent déja sélectionné on ne fait rien de plus
  57. if(current && $(this).index() == current.index()){
  58. return null;
  59. }
  60.  
  61.  
  62. current = $(this);
  63. });
  64. */
  65.  
  66. });
Advertisement
Add Comment
Please, Sign In to add comment