Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="container-fluid">
   <div class="row">
      <div class="col-md-12">
         <h1>jKanbanサンプル</h1>

            <a class="btn-xl btn btn-default" href="https://github.com/riktar/jkanban" target="_blank">Fork on GitHub</a>
         <hr>
         <div id="myKanban"></div>
         <button class="btn btn-success" id="addDefault">ボード追加</button>
         <button class="btn btn-success" id="addToDo">Todo追加</button>
         <button class="btn btn-danger" id="removeBoard">終わった作業を削除</button>
      </div>
   </div>
</div>

              
            
!

CSS

              
                body{font-family: "Lato"; margin:0; padding: 0;}
#myKanban{overflow-x: auto; padding:20px 0;}

.success{background: #00B961; color:#fff}
.info{background: #2A92BF; color:#fff}
.warning{background: #F4CE46; color:#fff}
.error{background: #FB7D44; color:#fff}
              
            
!

JS

              
                var KanbanTest = new jKanban({
        element : '#myKanban',
        gutter  : '10px',
        click : function(el){
            alert(el.innerHTML);
        },
        boards  :[
            {
                'id' : '_todo',
                'title'  : 'To Do (ドラッグ&ドロップ)',
                'class' : 'info',
                'item'  : [
                    {
                        'title':'ドラッグで動かしたり',
                    },
                    {
                        'title':'クリックしてみたり',
                    }
                ]
            },
            {
                'id' : '_working',
                'title'  : '例の案件',
                'class' : 'warning',
                'item'  : [
                    {
                        'title':'進める',
                    },
                    {
                        'title':'後で動作テスト',
                    }
                ]
            },
            {
                'id' : '_done',
                'dragTo' : ['_working'],
                'title'  : '終わった作業',
                'class' : 'success',
                'item'  : [
                    {
                        'title':'コーディング',
                    },
                    {
                        'title':'見積もり',
                    }
                ]
            }
        ]
    });

    var toDoButton = document.getElementById('addToDo');
    toDoButton.addEventListener('click',function(){
        KanbanTest.addElement(
            '_todo',
            {
                'title':'追加されたTodo',
            }
        );
    });

    var addBoardDefault = document.getElementById('addDefault');
    addBoardDefault.addEventListener('click', function () {
        KanbanTest.addBoards(
            [{
                'id' : '_default',
                'title'  : '追加されたカボード',
                'dragTo':['_todo','_working'],
                'class' : 'error',
                'item'  : [
                    {
                        'title':'アイテム1',
                    },
                    {
                        'title':'アイテム2',
                    },
                    {
                        'title':'アイテム3',
                    }
                ]
            }]
        )
    });

    var removeBoard = document.getElementById('removeBoard');
    removeBoard.addEventListener('click',function(){
        KanbanTest.removeBoard('_done');
    });
              
            
!
999px

Console