API Docs for:
Show:

Sagen Module

Requires
  • kaketsugi.js
  • wakegi.js
  • gasane.js

htmlタグへCSS classをセットします。
scriptタグdata属性から追加classをセットします

 <script type="text/javascript" src="/js/sagen.min.js"
      id="sagen"
      data-orientation="true"
      data-browser="true">
  </script>

 // html へ class を追加した例
  // OS X Chrome
 <html class="transition transform matchMedia background-size mac other chrome chrome41 chrome41_0 chrome41_0_2272 chrome41_0_2272_118 canvas webgl">

 // Browser / 端末判定にも使えます
 if ( Sagen.Browser.iOS.is() ) {
    // iOS
  }

 // orientation 監視にも使えます(iOS, Android)
  var Orientation = Sagen.Orientation;

 Orientation.on( Orientation.CHANGE_ORIENTATION, function ( event ) {
   var direction = event.direction;
   if ( direction === 'portrait' ) {
      // portrait
    }
   if ( direction === 'landscape' ) {
      // landscape
    }
 } );
 Orientation.listen();

This module provides the following classes:

This module is a rollup of the following modules: