JSFiddle - React, Tailwind, and code Playground

by mjmitche

JavaScript

var Game = Backbone.Model.extend({

    initialize: function () {
        // this.set({
        //   win: false,
        //   lost: false
        // });
    },
    new: function () {
        var _this = this;

        $.ajax({
            url: "http://search.twitter.com/search.json?q=from:realDonaldTrump",
            type: "GET",
            success: function (response) {
                var json = $.parseJSON(response);
                console.log(response.question);
                // console.log(response.questions.question);
                console.log(json);

                _this.trigger("gameStartedEvent", response);
            },
            error: function (r) {
                console.log("error");
                console.log(r);
            }
        });

    }

});