Skip to content
/ jsbox Public

this jQuery plugin allows to create live javascript exercises on a web page

Notifications You must be signed in to change notification settings

PoliteJS/jsbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSBox

JSBox is an easy to use jQuery plugin you can use to embed a Javascript sandbox in any web page.

http://PoliteJS.com/jsbox
http://github.com/PoliteJS/jsbox

Build JSBox from the source

In order to make a developement release you need:

then you can run the following command:

npm install && grunt

How To Use

For a complete documentation and usage examples visit PoliteJS/jsbox.

<!-- HTML -->
<div data-jsbox>
    
    <!-- [optional] code you want to show in the box -->
    <pre data-js>a = 'foo';</pre>
    
    <!-- [optional] a list of tests you want to run -->
    <pre data-test=>a === 'foo'</pre>
</div>

<!-- JS (put it at the bottom of your page) -->
<script src="//code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="jquery.jsbox-x.x.x.js"></script>

NOTE: whatever DOM Element with an data-jsbox attribute will be activated as a JSBox as soon as the page loads!

Tested On

  • Mac
    • Canary
    • Chrome
    • Safari
    • Firefox
    • Opera
  • iOS
    • Mobile Safari
    • Mobile Chrome

About

this jQuery plugin allows to create live javascript exercises on a web page

Resources

Stars

Watchers

Forks

Packages

No packages published