<commit_before>$(function() {
  var socket = io.connect("http://10.0.1.2:3000");
  var $card = $('#card');
  var cardOptions;

  var fillCard = function(data) {

    cardOptions = {
      id: data.id,
      position: data.position,
      color: data.color
    }

    console.log(cardOptions)

    $card.css({background: cardOptions.color, display: 'none'});
    $card.find('h1').text(cardOptions.position);
    $card.fadeIn();
  }

  socket.on('welcome', fillCard);
  socket.on('change', fillCard);

  $card.on('click', function(e){
    e.preventDefault();
    socket.emit('click', cardOptions);
  });
});<commit_msg>set card selected style when press it<commit_after>$(function() {
  var socket = io.connect("http://10.0.1.2:3000");
  var $card = $('#card');
  var cardOptions;

  var fillCard = function(data) {
    cardOptions = {
      id: data.id,
      position: data.position,
      color: data.color
    }

    console.log(cardOptions)

    $card.css({background: cardOptions.color, display: 'none'});
    $card.find('h1').text(cardOptions.position);
    $card.fadeIn();
    $card.css('display', 'table');
    $card.removeAttr('data-state');
  }

  socket.on('welcome', fillCard);
  socket.on('change', fillCard);

  $card.on('click', function(e){
    e.preventDefault();
    socket.emit('click', cardOptions);
    $(this).attr('data-state', 'selected');
  });
});
{'fraction_non_alphanumeric': 0.19752186588921283, 'fraction_numerical': 0.014577259475218658, 'mean_word_length': 3.457792207792208, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2453524', 'n_tokens_mistral': 478, 'n_tokens_neox': 458, 'n_words': 81}