Seemingly out of nowhere, I'm getting an error thrown on every button click action.
This is the error;
Uncaught TypeError: undefined is not a function
jquery-2.0.2.min.js:5
x.event.dispatch
y.handle
Here is the HTML;
<script id="make-your-bet-template" type="text/template">
<div class="joinGameWrapper">
<div id="betSummary"></div>
<div class="info">
<label for="inputEachBet">How much will you bet?</label>
<input id="inputEachBet" type="text" />
</div>
<div class="info buttons">
<button id="btnSendBet" class="btn">Commit</button>
</div>
</div>
</script>
Here is the JS (the console.log isn't rending either so I feel like the issue might be here);
onSendBet: function () {
var data = {
eachBet : $('#inputEachBet').val() || 'anon'
};
IO.socket.emit('playerSentBet', data);
App.myRole = 'Player';
App.myBid = data.eachBet;
console.log('hello');
},
Binding the buttons to functions;
bindEvents: function () {
// Host
App.$doc.on('click', '#btnCreateGame', App.Host.onCreateClick);
App.$doc.on('click', '#btnPlaceBet', App.Host.onPlaceBetClick);
App.$doc.on('click', '#btnLockGame', App.Host.onLockGame);
// Player
App.$doc.on('click', '#btnJoinGame', App.Player.onJoinClick);
App.$doc.on('click', '#btnStart',App.Player.onPlayerStartClick);
App.$doc.on('click', '.btnAnswer',App.Player.onPlayerAnswerClick);
App.$doc.on('click', '#btnPlayerRestart', App.Player.onPlayerRestart);
App.$doc.on('click', '#btnSendBet', App.Player.onSendBet);
},