This page demonstrates a simple login simulation. In this example, the page URL does not change when switching between the logged-in and logged-out states. But a multi-page implementation is just as easy.
<div class="permit permit-none"> <p class="alert alert-info">You're not logged in.</p> <a href="#" class="btn btn-primary permit-issue-members">Log in</a> </div> <div class="permit permit-members"> <p class="alert alert-success">Now you're logged in.</p> <a href="#" class="btn btn-danger permit-revoke-all">Log Out</a> </div>
$(document).ready(function() { $.permit( {permits: ['members']} ); });
Permit.js was developed by Tarek Anandan, a freelance information architect, UX specialist, and website developer based in Washington, DC.