A bit of JavaScript to fix your text rag for prepositions, small words, or emphasis.
JavaScript
171
0 commits
updated Jan 6, 2014
A bit of JavaScript to automatically fix the rag of any body of text. Where you allow your lines to break in a block of text can be very important for readability, and quite tricky within a fluid layout. With this script you can set how and where you want your lines to break, creating a much more pleasing text rag.
First, link to the script in your HTML.
…
<script src="./js/ragadjust.js" type="text/javascript"></script>
</body>
</html>
Then, in your own JavaScript, set the parameters:
…
<script src="./js/ragadjust.js" type="text/javascript"></script>
<script type="text/javascript">
ragadjust('p, li, dd', 'all');
</script>
</body>
</html>
There are only two parameters to set:
ragadjust(elements, method);
Rag Adjust will work in all modern browsers and IE8+.
JavaScript
100.0%
A bit of JavaScript to fix your text rag for prepositions, small words, or emphasis.
JavaScript
171
0 commits
updated Jan 6, 2014
A bit of JavaScript to automatically fix the rag of any body of text. Where you allow your lines to break in a block of text can be very important for readability, and quite tricky within a fluid layout. With this script you can set how and where you want your lines to break, creating a much more pleasing text rag.
First, link to the script in your HTML.
…
<script src="./js/ragadjust.js" type="text/javascript"></script>
</body>
</html>
Then, in your own JavaScript, set the parameters:
…
<script src="./js/ragadjust.js" type="text/javascript"></script>
<script type="text/javascript">
ragadjust('p, li, dd', 'all');
</script>
</body>
</html>
There are only two parameters to set:
ragadjust(elements, method);
Rag Adjust will work in all modern browsers and IE8+.
JavaScript
100.0%