a javascript library to make text vertical.
JavaScript HTML CSS
Latest commit 9b8fe07 Nov 8, 2015 @cmonos Update ReadMe.html
Permalink
Failed to load latest commit information.
README.md Update README.md Apr 6, 2012
ReadMe.html Update ReadMe.html Nov 9, 2015
taketori.css Update taketori.css Aug 28, 2015
taketori.js Update taketori.js Nov 9, 2015

README.md

About taketori.js

What's this ?

"taketori.js" is a javascript library to make text vertical.

Browser Support

InternetExplorer5.5+ / Firefox3.5+ / Safari3.2+ / Chrome3.0+ / Opera10.5+

Language

Chinese, Japanese, Korean

License

MIT License

How To Use

Preparation

Upload these two files same directory.

  • taketori.js
  • taketori.css

Sample

<script type="text/javascript" src="taketori.js" charset="UTF-8"></script>
<script type="text/javascript">
//<![CDATA[
(new Taketori()).set({key : value}).element('target element ID').toVertical([waiting for load or not]);
//]]>
</script>

Parameters

lang

  • 'ja-jp' = Japanese
  • 'zh-tw' = Taiwanese

fontFamily

  • 'serif'
  • 'sans-serif'
  • 'cursive'
  • 'kai'

height('em'|'px'|'width'=height of parent node.)

maxHeight('em'|'px')

multiColumnEnabled

  • false(default)
  • 'auto'
  • true(too slow)

gap('em'|'px')(=column-gap)

togglable(true|false)

cacheDisabled(true|false)

Tips

You can set these parameters as class name.

class="taketori-maxHeight-30em taketori-fontFamily-sans-serif"

How to set target elements.

  • 'element ID'
  • 'tagName.className'
  • '=auto'
  • '=dblclick'

Button Sample

<div class="tategaki">
縦書き 直排
</div>
<a href="#" id="toggle">Toggle</a>
<script type="text/javascript" src="taketori.js" charset="UTF-8"></script>
<script type="text/javascript">
//<![CDATA[
var taketori = (new Taketori()).set({fontFamily:'sans-serif'}).element('div.tategaki').toVertical();
taketori.document.element('toggle').addEventListener('click',function (e) {
    taketori.toggleAll();
    taketori.document.stopPropagation(e);
    taketori.document.preventDefault(e);
    return false;
});
//]]>
</script>