Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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


Save Automatically?

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.


                <div class="oj-flex oj-margin">
  <!-- ko foreach: {data: employees, as: 'emp'} -->
  <div data-bind="ojModule: { name: 'XKNNPw',
                  params: {
                      employee: emp,
                      onselect: $parent.selectEmployee
                  } }" class="employee">
  <!-- /ko -->
<div class="oj-margin">
  <h2>Selected data</h2>
  <pre data-bind="text: ko.toJSON(selectedEmployee, null, 2)"></pre>


                // Alta CSS included through settings
.employee {
  cursor: pointer;


                // require configuration imported from
], function(ko, oj) {
  'use strict';

  // The following overrides are necessary to load a
  // module from a codepen. These overrides are defined
  // at
  // relative path for modelPath because leading '/'
  //caused require to drop the .js suffix
  oj.ModuleBinding.defaults.modelPath = '../../jimj/pen/';
  oj.ModuleBinding.defaults.viewPath =

  // data
  var employees = [{
    id: 100,
    name: "Cordell Walker"
  }, {
    id: 101,
    name: "James Trivette"
  }, {
    id: 102,
    name: "Alexandra Cahill Walker"
  }, {
    id: 103,
    name: "'Big Dog' CD Parker"
  }, {
    id: 104,
    name: "Sydney Cooke"
  }, {
    id: 105,
    name: "Raymond Firewalker"
  }, {
    id: 106,
    name: "Francis Gage"
  }, {
    id: 107,
    name: "Trent Malloy"
  }, {
    id: 108,
    name: "Carlos Sandoval"
  } ];

  var ViewModel = function() {
    var self = this;

    self.employees = employees;
    self.selectedEmployee = ko.observable({});
    self.selectEmployee = function(employee) {
  ko.applyBindings(new ViewModel());
  window.ko = ko;