If not turn poll table
This commit is contained in:
parent
8e2cbb6146
commit
381f67f93b
@ -21,10 +21,12 @@
|
|||||||
// require_tree .
|
// require_tree .
|
||||||
|
|
||||||
|
|
||||||
|
// // If not your turn, poll the table
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
setInterval(function() {
|
setInterval(function() {
|
||||||
// $('#table-component').load("#{request.path} #table-component");
|
if ( $('.taking-turn.player[data-soft-token=' + soft_token + ']').length < 1 ) {
|
||||||
$('#play-to-beat').load("#{request.path} #play-to-beat");
|
$('#flash_message').load(window.location.pathname +" #flash_message");
|
||||||
$('#play-buttons').load("#{request.path} #play-buttons");
|
$('#table-component').load(window.location.pathname +" #table-component");
|
||||||
|
}
|
||||||
}, 2000);
|
}, 2000);
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user