Controls¶
Adding Properties¶
To enable the Recommends functionality on any section, add the readMore
property to the section configuration.
(window.readmo = window.readmo || []).push({
section: '12345',
container: '#readmo-12345'
readMore: true
});
Or you can customize the Recommends implementation like this:
(window.readmo = window.readmo || []).push({
section: '12345',
container: '#readmo-12345'
readMore: {
speed: 500,
previewHeight: 450,
buttonHtml: '<div>My Custom</div>',
buttonText: 'Continue Reading',
onLoad: function(){},
beforeExpand: function(){},
afterExpand: function(){}
}
});
Properties¶
Property |
Description |
Type |
Required |
---|---|---|---|
|
Expanding animation speed in milliseconds. |
number |
No |
|
Height in pixels to clip the article. |
number |
No |
|
Used to specify custom text on the button. |
string |
No |
|
Custom html string template to render for the button.” |
string |
No |
|
Event fired once the Read More rendering is complete. |
function |
No |
|
Event fired before expanding the article to full height. |
function |
No |
|
Event fired after the article has been expanded. |
function |
No |
Once enabled, the parent container height will be restricted to the previewHeight defined. If the container height is less than the specified previewHeight, the Read More button is not rendered.