]> _ Git - ccgm.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 13 Aug 2013 13:28:49 +0000 (13:28 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 13 Aug 2013 13:28:49 +0000 (13:28 +0000)
css/actualites.css
js/actualites.js

index 62795ab6181eaac392defcb41a7378ded71d7d55..4dd919b71c300cc13cb90966e33fd40e81161950 100644 (file)
        height: 31px;
        text-indent: -9999px;
        overflow: hidden;
-       bottom: 68px;
-       float:left;
+       top:0px;
+       right:35px;
+       position:absolute;
        background-image: url(../images/arrow-news-left.svg);
        background-size: 30px 30px;
 }
 .updates .btn-next {
        margin:0 0 0 5px;
+       right:0px;
        background-image: url(../images/arrow-news-right.svg);
 }
 .updates .btn-area{
index 7ed9c715e31c1671fbf376a191ae590afcb522f8..bd9f3628f2d9f6e68301298be8dea611205cf5f1 100644 (file)
@@ -39,6 +39,8 @@
                        }\r
                        var $this = this;\r
                        this.animating = true;\r
+                       var w = 870;\r
+                       var d = 0.5;\r
                        var dir = -1;\r
                        if (index > this.currentIndex) {\r
                                dir = 1;\r
 \r
                        if (this.currentIndex == -1) {\r
                                $(nextActu).show();\r
+                               this.arrowsVisibility(index, d);\r
                                this.endTransition(index);\r
                                return;\r
                        }\r
                        var currentActu = this.getActu(this.currentIndex);\r
-                       var w = 870;\r
+\r
 \r
                        $(nextActu).css('left', w * -dir).show();\r
-                       TweenMax.to(nextActu, 0.5, {left: 0});\r
-                       TweenMax.to(currentActu, 0.5, {left: w * dir, onComplete: function() {\r
+                       TweenMax.to(nextActu, d, {left: 0});\r
+                       TweenMax.to(currentActu, d, {left: w * dir, onComplete: function() {\r
                                        $this.endTransition(index);\r
                                }\r
                        });\r
+                       this.arrowsVisibility(index, d);\r
+\r
+\r
+\r
+\r
+               },\r
+               arrowsVisibility: function(index, d) {\r
+                       var prev = this.element.find('.btn-prev');\r
+                       var next = this.element.find('.btn-next');\r
+                       if (index == 0) {\r
+                               $(prev).fadeOut(d * 1000);\r
+                       } else {\r
+                               $(prev).fadeIn(d * 1000);\r
+                       }\r
+\r
+                       if (index == this.number - 1) {\r
+                               $(next).fadeOut(d * 1000);\r
+                       } else {\r
+                               $(next).fadeIn(d * 1000);\r
+                       }\r
                },\r
                getActu: function(index) {\r
                        return this.element.find('.slide:eq(' + index + ')');\r
                        this.animating = false;\r
                        this.getActu(this.currentIndex).hide();\r
                        this.currentIndex = index;\r
-                       if (this.currentIndex == 0) {\r
-                               TweenMax.to(this.element.find('.btn-prev'), 0.5, {opacity: 0});\r
-                       } else {\r
-\r
-                       }\r
                },\r
        };\r
 \r