Ciao a tutti non sono bravo con la programmazione JavaScript ed ho cercato su internet come si scrive una funzione con variabile in stringa jQuery 1.0 ma non ci sono riuscito perchè visualizzo errori del tipo che $ non è una funzione. Qui il codice che non riesco a scrivere in stringa jQuery 1.0

codice:
function mark(e) {

        var td = e.target;

        if (td.innerHTML) {
            return;
        }

        var row = td.getAttribute('row'),
            column = td.getAttribute('column');

        var current_mark = moves % 2 === 0
            ? 'X'
            : 'O';

        td.innerHTML = current_mark;
        $(td).addClass(current_mark);
        data[row + '' + column] = current_mark;

        moves++;

        setTimeout(function() {
            if (didWin(current_mark)) {
                alert(current_mark + ' vince la partita!');
                scores[current_mark]++;
                updateScoreboard();
                empty();
            } else if (moves === Math.pow(grid_size, 2)) {
                alert("Pareggio!");
                empty();
            }
        }, 0);

    }