diff options
author | Jed Foster <jed@jedfoster.com> | 2013-09-21 21:08:34 -0700 |
---|---|---|
committer | Jed Foster <jed@jedfoster.com> | 2013-09-21 21:23:48 -0700 |
commit | a94c7743f8607639fe72dab2eb2dbf23cb4583cf (patch) | |
tree | 17a3ce4d7c74933acbfc9b2383944afd70371468 /readmore.js | |
parent | adcf5376db39f270774d384b41411016bb24b184 (diff) | |
download | Readmore.js-a94c7743f8607639fe72dab2eb2dbf23cb4583cf.zip Readmore.js-a94c7743f8607639fe72dab2eb2dbf23cb4583cf.tar.gz Readmore.js-a94c7743f8607639fe72dab2eb2dbf23cb4583cf.tar.bz2 |
Expose section CSS as a config option. Closes #13
Diffstat (limited to 'readmore.js')
-rw-r--r-- | readmore.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/readmore.js b/readmore.js index 20fc294..c8d6873 100644 --- a/readmore.js +++ b/readmore.js @@ -13,6 +13,7 @@ maxHeight: 200, moreLink: '<a href="#">Read More</a>', lessLink: '<a href="#">Close</a>', + sectionCSS: 'display: block; width: 100%;', // callbacks beforeToggle: function(){}, @@ -28,7 +29,7 @@ delete(this.options.maxHeight); - var styles = '.readmore-js-toggle, .readmore-js-section { display: block; width: 100%; } .readmore-js-section { overflow: hidden; }'; + var styles = '.readmore-js-toggle, .readmore-js-section { ' + this.options.sectionCSS + ' } .readmore-js-section { overflow: hidden; }'; (function(d,u) { var css=d.createElement('style'); |