JSFiddle - React, Tailwind, and code Playground

by lostinplace

HTML

<script src ="http://ajax.cdnjs.com/ajax/libs/json2/20110223/json2.js"></script>
<span id="herp"></span>

JavaScript

$(function(){
    var settings = {
        url:"http://lostinplace.iriscouch.com/eveskills/_design/example",
        type: "PUT",
        data: {
                "_id" : "_design/example",
                "views" : {
                    "foo" : {
                      "map" : "function(doc){ emit(doc._id, doc._rev)}"
                    }
                  }
        },
      dataType:"jsonp",
       success:function(result){$('#herp').text(JSON.stringify(result));},
        error:function(result){$('#herp').text(JSON.stringify(result));}
};
       //debugger;
    $.ajax(settings);
    
});