-
-
Save jamiejohnsonkc/75d78fab92abc8bbffbe451fb7aed7c1 to your computer and use it in GitHub Desktop.
readmore/readless #accordian #button #effect
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
| .container__accordian{ | |
| display: none; | |
| } |
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
| <a href="#mo-solutions" class="ui-button__expand ui-button__expand--black-white mo__expand-button" id="expand-mo-solutions" title="read more"><?php get_template_part('buttons/button', 'expand'); ?></a> | |
| <div class="container__accordion mo__accordian" id="mo-solutions"> | |
| <div class="mo__diagram-copy">I begin every project with four simple words —what is your objective.It doesn't matter if it's stunning or cutting-edge if it doesn't solve your problem.</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
| jQuery(document).ready(function($) { | |
| $('#expand-mo-solutions').click(function(e) { | |
| e.preventDefault(); | |
| var id = $(this).attr('href'); | |
| if ($(id).is(":visible")) { | |
| $(this).text("Read More"); | |
| } else { | |
| $(this).text("Read Less"); | |
| } | |
| $(id).slideToggle(500); | |
| }) | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment