Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.2/backbone.js"></script>
<script src="https://cdn.rawgit.com/marionettejs/backbone.marionette/master/lib/backbone.marionette.js"></script>
<script src="https://cdn.rawgit.com/Squareknot/marionette.state/v1.0.1/build/marionette.state.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
  <style>
    label {
      display: block;
    }
    .app {}
    .user {
      margin-top: 20px;
    }
    .edit-user {
      margin-top: 20px;
    }
  </style>
</head>
<body>
  <main>
    <div id="app-info-region"></div>
    <div id="open-user-region"></div>
    <div id="user-profile-region"></div>
  </main>
  <script type="text/template" id="app-tpl">
    <h2>App Info</h2>
    Logged-in User ID: <%- loggedInUserId %>
  </script>
  <script type="text/template" id="edit-user-tpl">
    <h2>Open User Profile</h2>
    <label>
      User ID
      <input type="text" name="user" />
    </label>
    <label>
      <button type="button" name="changeUser">View Profile</button>
    </label>
  </script>
  <script type="text/template" id="user-tpl">
    <h2>Profile for User <%- userId %></h2>
    <div>
      Is Logged-in User? <%- isLoggedInUser %>
    </div>  
  </script>
</body>
</html>
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers