cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation


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.

              <main ng-app="myApp">
  <p>Two way data binding can be used to display what the user types in real time:</p>
    <input type="text" id="input" />
    <span id="output"></span>
  <p>Use two way data binding to filter a list on the fly:</p>
  <table border="1" cellspacing="0" cellpadding="0" ng-controller="myCtrl">
      <td><input type="text" id="filtering"></td>
      <th>Email Address</th>
    <tbody id="people">
              * {
  box-sizing: border-box;

div {
  margin: 10px;
  padding: 5px;
  width: 320px;

table {
  width: 50%;

td {
  padding: 5px;

td input {
  width: 100%;
  padding: 10px;

              (function () {
  // Function required for data binding
  $('#input').keyup(function (event) {
  var people = [
      { name: "John Smith", email: "smithj@example.com" },
      { name: "Jane Doe", email: "jane.doe@example.com" },
      { name: "Jeff Smith", email: "jsmith@mail.com" },
      { name: "Jake Doe", email: "jake@sf.com" }
  // "ng-repeat" to make the array add to the table
  $.each(people, function(index, value) {
    $('#people').append("<tr><td>" + 
      value.name +
      "</td><td>" +
      value.email + "</td></tr>"
  // "filtering"
  $('#filtering').keyup(function (event) {
    var filtering = $(this).val();
    if(filtering == '') {
      $('#people tr').show();
    // Filter the people
    $('#people').find('tr').each(function () {
      var values = [];
      $this  = $(this);
      // Get the value of the elements
      $this.children('td').each(function () {
      // Show hide if value is in the tds
      $.grep(values, function (n, i) {
        if(n.indexOf(filtering) >= 0) {
        } else {
      }, true);

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.


Loading ..................