Skip to content

Commit 89ba7c7

Browse files
authored
Merge pull request #79 from phpList/arrow-animation-fix
fix arrow animation on updater
2 parents db12db8 + 3e0978a commit 89ba7c7

File tree

1 file changed

+33
-39
lines changed

1 file changed

+33
-39
lines changed

index.php

Lines changed: 33 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,12 +1310,13 @@ function replaceNewUpdater()
13101310
margin-bottom: 9px;
13111311
}
13121312

1313-
li.migrate {
1313+
li.migrate a {
13141314
color: #253746;
13151315
font-family: Montserrat, SemiBold;
13161316
font-size: 18px;
13171317
letter-spacing: 0.3px;
13181318
margin-bottom: 20px;
1319+
text-decoration: none;
13191320
}
13201321

13211322
#success-message {
@@ -1390,36 +1391,6 @@ function replaceNewUpdater()
13901391
padding: 1px 10px;
13911392
}
13921393

1393-
.rotate {
1394-
-moz-transition: all 1.5s ease-out;
1395-
-webkit-transition: all 1.5s ease-out;
1396-
transition: all 1.5s ease-out;
1397-
1398-
}
1399-
1400-
.rotate.down {
1401-
-moz-transform: rotate(180deg);
1402-
-webkit-transform: rotate(180deg);
1403-
transform: rotate(180deg);
1404-
transition: all 1.5s ease-out;
1405-
}
1406-
1407-
.arrow-up {
1408-
width: 21px;
1409-
height: 12px;
1410-
background-image: url(images/arrow_up.png);
1411-
background-repeat: no-repeat;
1412-
margin: 0 auto;
1413-
}
1414-
1415-
.arrow-down {
1416-
width: 21px;
1417-
height: 12px;
1418-
background-image: url(images/arrow_down.png);
1419-
background-repeat: no-repeat;
1420-
margin: 0 auto;
1421-
}
1422-
14231394
.listItems {
14241395
background-image: url('images/check.svg');
14251396
background-repeat: no-repeat;
@@ -1506,6 +1477,17 @@ function replaceNewUpdater()
15061477
padding-left: 28%;
15071478
}
15081479

1480+
#arrowdown {
1481+
width: 21px;
1482+
height: 12px;
1483+
background-image: url(images/arrow_down.png);
1484+
background-repeat: no-repeat;
1485+
margin: 0 auto;
1486+
-moz-transition: all 1.5s ease-out;
1487+
-webkit-transition: all 1.5s ease-out;
1488+
-o-transition: all 1.5s ease-out;
1489+
transition: all 1.5s ease-out;
1490+
}
15091491
</style>
15101492
</head>
15111493
<body>
@@ -1720,10 +1702,9 @@ function replaceNewUpdater()
17201702

17211703
<!-- Info updater section -->
17221704
<div class="outer">
1723-
<button class="info-footer">
1724-
<div class="arrow-down rotate"></div>
1705+
<button class="info-footer" id="button">
1706+
<div id="arrowdown"></div>
17251707
</button>
1726-
17271708
<div class="inner">
17281709
<div id="wrap">
17291710
<div id="left">
@@ -1796,6 +1777,24 @@ class="book"/>
17961777
<!-- Load jquery-3.3.1.min.js file -->
17971778
<script type="text/javascript" src="../admin/js/jquery-3.3.1.min.js"></script>
17981779

1780+
<!-- script for arrow animation -->
1781+
<script type="text/javascript">
1782+
var rotated = false;
1783+
1784+
document.getElementById('button').onclick = function() {
1785+
var div = document.getElementById('arrowdown'),
1786+
deg = rotated ? 0 : 180;
1787+
1788+
div.style.webkitTransform = 'rotate('+deg+'deg)';
1789+
div.style.mozTransform = 'rotate('+deg+'deg)';
1790+
div.style.msTransform = 'rotate('+deg+'deg)';
1791+
div.style.oTransform = 'rotate('+deg+'deg)';
1792+
div.style.transform = 'preserve-3d('+deg+'deg)';
1793+
1794+
rotated = !rotated;
1795+
}
1796+
</script>
1797+
17991798
<!-- script for slideToggle -->
18001799
<script type="text/javascript">
18011800
$('.outer button').on("click", function () {
@@ -1805,11 +1804,6 @@ class="book"/>
18051804
});
18061805
</script>
18071806
<!-- Arrow transition -->
1808-
<script type="text/javascript">
1809-
$(".rotate").click(function () {
1810-
$(this).toggleClass("down");
1811-
})
1812-
</script>
18131807
<script type="text/javascript">
18141808
$("#center").addClass("cutomMinHeight");
18151809
$(".fixed").addClass("cutomMinHeight");

0 commit comments

Comments
 (0)