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
In order to make a developement release you need:
then you can run the following command:
npm install && grunt
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!
- Mac
- Canary
- Chrome
- Safari
- Firefox
- Opera
- iOS
- Mobile Safari
- Mobile Chrome