Giter Club home page Giter Club logo

taketori-js's Introduction

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>

taketori-js's People

Contributors

cmonos avatar timdream avatar

Watchers

James Cloos avatar Koki Takahashi avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.