a javascript library to make text vertical.
JavaScript HTML CSS
Switch branches/tags
Nothing to show
Latest commit 5cb9bf7 Apr 17, 2017 @cmonos committed on GitHub Merge pull request #2 from bryant1410/master
Fix broken headings in Markdown files
Permalink
Failed to load latest commit information.
README.md Fix broken Markdown headings Apr 17, 2017
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>