Skip to content

Latest commit

 

History

History
52 lines (34 loc) · 1.26 KB

README.md

File metadata and controls

52 lines (34 loc) · 1.26 KB

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