JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://include.jaydata.org/jaydata.js"></script>
<div>
    <button id="Button1">create context</button>
    <button id="btnAdd">add</button>
</div>

JavaScript

$(function () {

            $data.Entity.extend('$todo.Types.ToDoEntry', {
                Id: { type: 'int', key: true, computed: true },
                Value: { type: 'string' },
                CreatedAt: { type: 'datetime' },
                ModifiedAt: { type: 'datetime' },
                Done: { type: 'bool' }
            });

            $data.EntityContext.extend('$todo.Types.ToDoContext', {
                TodoEntries: { type: $data.EntitySet, elementType: $todo.Types.ToDoEntry }
            });

            $('#Button1').click(function (e) {
                var provider = "indexedDb";
                var options = { name: provider, databaseName: 'todo'};
                loadContext(options);

                return false;
            });

            $('#btnAdd').click(function () {
                var value = 'ravi';
                if (!value) return;
                var now = new Date();
                var entity = new $todo.Types.ToDoEntry({ Value: value, CreatedAt: now, ModifiedAt: now });

                try {
                    $todo.context.TodoEntries.add(entity);
                }
                catch (Error) {

                    alert(Error.Message);
                }
                $todo.context.saveChanges(function(result){
                    alert(JSON.stringify(result));
                });
            });

            return false;
        });

        function loadContext(options) {

            $todo.context = new $todo.Types.ToDoContext(options);

            try {
                $todo.context.onReady({
                    success: function () {
                        alert("Sucessfully");
                    },
                    error: function (error) {
                        alert("Failed" + error);
                        $todo.context = null;

                    },
                    notify: function (e) {

                        var result = e.value;

                        alert('Notify');
                  ...