Tagged: x
-
AuthorPosts
-
January 20, 2017 at 2:10 pm #1338818
kateanitaParticipantHello,
I’m using the Visual Composer accordion and was wondering if there is a way to have the “Read More” words change to “Read Less” when the accordion is opened.
Here is the page I’m working on: http://homefed.stapkodesign.com/
Everything I have is the latest version.
Thanks!
Katie
January 20, 2017 at 6:39 pm #1339097
Rue NelModeratorHello Katie,
Thanks for writing in! To resolve your issue, please add the following JS code in the customizer, Appearance > Customize > Custom > Javascript
(function($){ $('#page-id-8 #x-content-band-1 .x-accordion-toggle').on('click touchend', function(){ if( ! $(this).hasClass('collapsed') ) { $(this).text('Read More'); } else { $(this).text('Read Less'); } }) })(jQuery);We would loved to know if this has work for you. Thank you.
January 23, 2017 at 4:32 pm #1342200
kateanitaParticipantThanks for the response! Unfortunately that didn’t work… 🙁
January 23, 2017 at 4:57 pm #1342232
NicoModeratorHi There,
Please try this code below:
jQuery(document).ready(function( $ ) { $('#x-content-band-1 .x-accordion-toggle').click(function(event){ var item = $(this); if(item.hasClass('collapsed')) {item.html('Read Less'); } else { item.html('Read More'); } }); });Let us know how it goes.
Thanks.
January 24, 2017 at 4:10 pm #1343797
kateanitaParticipantThat worked perfectly! You guys are awesome, thanks so much!
January 24, 2017 at 7:33 pm #1344061
NicoModeratorHappy to hear that.
Feel free to ask us again.
Thanks.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1338818 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
