function status (isConnected) {
    if (isConnected) {
      $('#join').removeClass('hidden')
      $('#status').addClass('label-success').removeClass('label-danger label-default').text('connected')
    } else {
      $('main').addClass('hidden')
      $('#messages').empty()
      $('#status').addClass('label-danger').removeClass('label-success label-default').text('disconnected')
    }
    disableForm(!isConnected)
  }
// function for setting the connection status
function for setting the connection status
function for setting the connection status
function status (isConnected) {
    if (isConnected) {
      $('#join').removeClass('hidden')
      $('#status').addClass('label-success').removeClass('label-danger label-default').text('connected')
    } else {
      $('main').addClass('hidden')
      $('#messages').empty()
      $('#status').addClass('label-danger').removeClass('label-success label-default').text('disconnected')
    }
    disableForm(!isConnected)
  }
function status ( isConnected ) { if ( isConnected ) { $ ( '#join' ) . removeClass ( 'hidden' ) $ ( '#status' ) . addClass ( 'label-success' ) . removeClass ( 'label-danger label-default' ) . text ( 'connected' ) } else { $ ( 'main' ) . addClass ( 'hidden' ) $ ( '#messages' ) . empty ( ) $ ( '#status' ) . addClass ( 'label-danger' ) . removeClass ( 'label-success label-default' ) . text ( 'disconnected' ) } disableForm ( ! isConnected ) }
function for setting the connection status
function for setting the connection status