Created
August 22, 2018 17:10
-
-
Save olivx/2ec60b007320705b7f75360f307f44ea to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="card"> | |
<div class="card-header"> | |
<span style="display:block"> | |
<span data-target="#job-{{ job.ref_number }}" data-toggle="collapse" | |
class="text-muted pull-right el-collpse" style="cursor: pointer" aria-expanded="false"> | |
<i class="fa fa-angle-right js-rotate-if-collapsed"></i> | |
</span> | |
</span> | |
<span style="display:block"> | |
{{ job.title }} | |
</span> | |
</div> | |
<div id="job-{{ job.ref_number }}" class="card-body collapse"> | |
<h1> here thre !</h1> | |
</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.card-header .fa{ | |
transition: .5s transform ease-in-out; | |
} | |
[data-toggle="collapse"][aria-expanded="true"] > .js-rotate-if-collapsed { | |
-webkit-transform: rotate(90deg); | |
-moz-transform: rotate(90deg); | |
-ms-transform: rotate(90deg); | |
-o-transform: rotate(90deg); | |
transform: rotate(90deg); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var flag = false; | |
$('.el-collpse').click(function(){ | |
flag = !flag; | |
$(this).attr('aria-expanded', flag) | |
console.log(flag); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment