examples/chatty/public/js/app.js
function openChat() {
        var num = validateNum();

        if(num) {
            socket.emit('setup', num, function() {
                number = num;
                $('#num').hide();
                $('#chat').show();
            });
        }
    }
function openChat() {
        var num = validateNum();

        if(num) {
            socket.emit('setup', num, function() {
                number = num;
                $('#num').hide();
                $('#chat').show();
            });
        }
    }
function openChat ( ) { var num = validateNum ( ) ; if ( num ) { socket . emit ( 'setup' , num , function ( ) { number = num ; $ ( '#num' ) . hide ( ) ; $ ( '#chat' ) . show ( ) ; } ) ; } }
opens a chat session with a number
opens a chat session with a number