Difference between revisions of "MobileApps-What does the coloring mean on the list of event?"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
+ | <script> | ||
$(".header").click(function () { | $(".header").click(function () { | ||
Line 15: | Line 16: | ||
}); | }); | ||
− | + | </script> | |
Revision as of 15:13, 19 December 2015
<script> $(".header").click(function () {
$header = $(this); //getting the next element $content = $header.next(); //open up the content needed - toggle the slide- if visible, slide up, if not slidedown. $content.slideToggle(500, function () { //execute this after slideToggle is done //change text of header based on visibility of content div $header.text(function () { //change text based on condition return $content.is(":visible") ? "Collapse" : "Expand"; }); });
}); </script>
Expand
- This is just some random content.
- This is just some random content.
- This is just some random content.
- This is just some random content.