Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eduard-ungureanu/0e4a864f7b3d3478567a0ea4d1d21c26 to your computer and use it in GitHub Desktop.
Save eduard-ungureanu/0e4a864f7b3d3478567a0ea4d1d21c26 to your computer and use it in GitHub Desktop.
<script>
(function($) {
$(document).ready(function(){
$('.et-show-more-toggle').on('click', function(e) {
e.preventDefault();
$(e.target).closest('.et-show-more-container').children('.et-show-more-content').slideToggle("300");
$(this).toggleClass('et-show-more-toggle_active');
if ($(this).hasClass('et-show-more-toggle_active')) {
$(this).text('Show Less');
} else {
$(this).text('Show More');
}
});
});
})(jQuery);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment