Releases: jedfoster/Readmore.js
Releases · jedfoster/Readmore.js
2.2.1
v2.2.0
v2.1.0
Improvements
- Added CommonJS/AMD support (Thanks to @joshua703 and @mattmattmatt)
- Published to npm as
readmore-js; Bower is still available, but npm is now preferred - Fixed a bug with how
startOpenworked (Thanks @arusahni) - The
elementargument to thebeforeandafterTogglecallbacks is now a jQuery object - Added MIT license
v2.0.5
IE8 compatibility fix; thanks @stelioschar
v2.0.2: Refactor init()
Fixes
- Rolled back calling
init()onwindow.load, instead,initis called immediately andresizeBoxesis called onwindow.load. Should address #76
2.0.0
New features
- Install with Bower:
bower install readmore - Blocks can now be toggled programmatically:
$('article:nth-of-type(3)').readmore('toggle') - ARIA semantics describe expanded state and relationship between blocks and their toggles
- Blocks are now assigned an ID if they don't already have one
- Install development dependencies with NPM
- Gulp task to minifiy with UglifyJS
Improvements
- Height calculations on window resize are "debounced", resulting in more efficient rendering
- Height calculation in general has been improved
- The value of the
expandedargument passed to thebeforeTogglecallback now correctly reflects the pre-toggle state - Multiple instances are now fully supported: e.g.
$('article').readmore({speed: 200})and$('fieldset').readmore({speed: 900})will work on the same page - Fully responsive, plugin now prefers max-heights set in CSS, even inside media queries
Potentially breaking changes
maxHeightoption is nowcollapsedHeightsectionCSSoption is nowblockCSStoggleSlider()method is now justtoggle()- Animation is now performed with CSS3 transitions, rather than
jQuery.animate() - IE 8 and 9 are no longer supported, because those browsers hate kittens
init()is now called within awindow.onloadevent handler, which can briefly delay collapsing contentsetBoxHeight()is now a "private" method calledsetBoxHeights()resizeBoxes()is also now private- Readmore.js now uses attribute selectors, rather than classes
- The
.readmore-js-sectionand.readmore-js-toggleclasses are gone - The
expandedClassandcollapsedClassoptions are also gone - Every Readmore.js block needs an ID, if one is not already present, one will be generated
- The