On Fri, 2009-11-27 at 08:18 +0100, Johan Euphrosine wrote:
> On Thu, 2009-11-26 at 11:26 -0500, Larry wrote:
> > Could anyone show me how to access the seating position information in
> > the DOM?
>
> You can use the following javascript code to get the seat number, once
> logged and sitted:
>
> >>> var server = $.jpoker.getServer('/poker/POKER_REST');
> >>> var game_id = 42;
> >>> var seat = $.jpoker.getPlayer(server.url, game_id,
> server.serial).seat
> >>> console.log(seat);
> 2
>
> And there are the following css classes set on the player seat element:
> jpoker_player_self jpoker_player_seat jpoker_player_seat2
>
> Hope that helps.
>
Thanks Johan,
I took the following line of code that you supplied:
>>> var seat = $.jpoker.getPlayer(server.url, game_id,
> server.serial).seat
and simply plugged it into the existing code located @ case
'PacketPokerPlayerArrive'. I chose this because it had all the necessary
variables defined already and would initiate whenever a player arrives
at a table. I thought this would be the best place for it, would you
disagree? Then I added some code to automatically switch the css files.
It works perfectly!
Thanks again.
_______________________________________________
Pokersource-users mailing list
[email protected]
https://mail.gna.org/listinfo/pokersource-users