jedfoster/Readmore.js

Collapsed class?

Closed this issue · 2 comments

Hi!
I used old version and it was possible to set Collapsed and Expanded Class.

We had option for that:

expandedClass: 'readmore-js-expanded',
collapsedClass: 'readmore-js-collapsed',

But I can understand how to make same in latest version... I need to set some class effects only for collapsed block.

Thanks.

Readmore.js now uses attribute selectors, rather than classes. Use [aria-expanded="true"] and [aria-expanded="false"], as your expanded and collapsed selectors, respectively.

I have an issue with this. Everything is working fine with readmore except that the aria-expanded attribute never changes from false to true. It says false whether the text is expanded or not.

I can see the inline CSS height changing dynamically but not the aria-expanded attribute.

Thanks and let me know what info would be helpful.