Commit 93f96e6a by Simon

Update readme

parent 793787cb
...@@ -4,23 +4,55 @@ ...@@ -4,23 +4,55 @@
# Use in your project # Use in your project
````
npm install
````
## FrontEnd
app.js app.js
``` ```javascript
$( document ).ready(function() { $( document ).ready(function() {
$('.doodle').Doodle(); $('.doodle').Doodle({
editMode: false,
output: '#inputVal',
input: '#inputVal'
});
}); });
``` ```
index.html index.html
```html
<div class="doodle table-responsive" data-json="json/data.json"></div>
<input type="hidden" id="inputVal" value='' />
``` ```
<div class="doodle" data-json="path/to/data.json"> Insert into boostrap's container
<input type="hidden" id="inputVal" value="{}">
</div>
##Backend
app.js
```javascript
$( document ).ready(function() {
$('.doodle').Doodle({
editMode: true,
output: '#inputVal',
input: '#inputVal'
});
});
``` ```
index.html
````html
<div class="doodle table-responsive"></div>
<input type="hidden" id="inputVal" value='{"19/01/2018":["10","11","12"],"20/01/2018":["10","11","12"],"21/01/2018":["10","11","12"],"22/01/2018":["10","11","12"],"23/01/2018":["10","11","12"],"24/01/2018":["10","11:15","12"]}'>
````
Value can be empty
##For all
Include all dependencies Include all dependencies
``` ```html
<!-- Jquery --> <!-- Jquery -->
<script src="/node_modules/jquery/dist/jquery.js"></script> <script src="/node_modules/jquery/dist/jquery.js"></script>
<script src="/node_modules/tether/dist/js/tether.js"></script> <script src="/node_modules/tether/dist/js/tether.js"></script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment