Skip to content

Releases: jedfoster/Readmore.js

2.2.1

22 Sep 22:32
Compare
Choose a tag to compare

Fixes

  • Syntax issues (#186 and #187)
  • Published to npm registry

v2.2.0

13 May 17:48
Compare
Choose a tag to compare

Fixes

  • Issues with _this in toggle method (#131)
  • Loosened dependency on jQuery, fixes getting multiple versions of jQuery when bundling with Browserify (#146)
  • Added jQuery as a Bower dependency (#127)

Improvements

  • Added blockProcessed callback function (#136)
  • Added the block's ID as the value of the data-readmore-toggle attribute of "Read more" and "Close" links, allowing greater visibility into exactly what block was toggled (#142)
  • Wrap the Gulp compress task in npm build script ($ npm run build)

v2.1.0

01 Nov 07:10
Compare
Choose a tag to compare

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 startOpen worked (Thanks @arusahni)
  • The element argument to the before and afterToggle callbacks is now a jQuery object
  • Added MIT license

v2.0.5

16 Feb 05:15
Compare
Choose a tag to compare

IE8 compatibility fix; thanks @stelioschar

v2.0.2: Refactor init()

02 Feb 01:58
Compare
Choose a tag to compare

Fixes

  • Rolled back calling init() on window.load, instead, init is called immediately and resizeBoxes is called on window.load. Should address #76

2.0.0

03 Jan 08:02
Compare
Choose a tag to compare

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 expanded argument passed to the beforeToggle callback 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

  • maxHeight option is now collapsedHeight
  • sectionCSS option is now blockCSS
  • toggleSlider() method is now just toggle()
  • 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 a window.onload event handler, which can briefly delay collapsing content
  • setBoxHeight() is now a "private" method called setBoxHeights()
  • resizeBoxes() is also now private
  • Readmore.js now uses attribute selectors, rather than classes
    • The .readmore-js-section and .readmore-js-toggle classes are gone
    • The expandedClass and collapsedClass options are also gone
    • Every Readmore.js block needs an ID, if one is not already present, one will be generated