I am totaly lost now. I upload my whole code. Is someone could help me I will appreciate it so much!! How can I change it to do not use jQuery, only javaScript?

```
 var CARDS_NUM = 20;    // number of cards in total
var ROW = 5;    //number of cards in rows
var cards = [];
var takenCards = [];
var availableCards= true;   //cards which are available to choose
var attemptsNumber = 0;     //number of moves
var pairs= 0;       //number of guessed pairs of cards
var cadsImages = [
'duck.PNG',
'elephant.png',
'monkey.png',
'pig.png',
'pinguin.png',
'cow.png',
'sheep.png',
'zebra.png',
'lion.png',
'horse.png'
 ];

function startGame() {
cards = [];
takenCards = [];
availableCards = true;
attemptsNumber = 0;
pairs = 0;

var board = $('.board').empty();

for (var i=0; i<CARDS_NUM; i++) {
    cards.push(Math.floor(i/2));
}

```

There is a part which you were suggest me:  

 for (i=CARDS\_NUM-1; i>0; i--) {
 var swap = Math.floor(Math.random()\*i);
 var tmp = cards[i];
 cards[i] = cards[swap];
 cards[swap] = tmp;
 }

```
for (var i = 0; i < CARDS_NUM; i++) {

var tile = document.createElement('card');

tile.className = 'card';
tile.setAttribute('data-cardType', cards[i]);
tile.setAttribute('data-index', i);

var current_width = tile.style.width,
    current_height = tile.style.height;

tile.style.left = 5 + (current_width + 5) * (i % ROW);
tile.style.top = 5 + (current_height + 5) * (Math.floor(i / ROW));

board.appendChild(tile);

}

document.addEventListener('click', function(event) {

var target = event.target || event.srcElement;

cardClick(target);
});

```

end of it.

```
function cardClick(element) {
if (availableCards) {
    //if none element is taken
    //or if element's index is not in taken cards
    if (!takenCards[0] || (takenCards[0].data('index') != element.data('index'))) {
        takenCards.push(element);
        element.css({'background-image' :      'url('+cadsImages[element.data('cardType')]+')'})    
    }

    if (takenCards.length == 2) {
        takenCards = false;
        if (takenCards[0].data('cardType') == takenCards[1].data('cardType')) {
            setTimeout('deleteCards()', 500);
        } else {
            setTimeout('resetCards()', 500);
        }

        attemptsNumber++;
        $('.cards').html(attemptsNumber)
    }
}
}

 function deleteCards() {
takenCards[0].fadeOut(function() {
    $(this).remove();
});
takenCards[1].fadeOut(function() {
    $(this).remove();

    pairs++;
    if (pairs >= CARDS_NUM / 2) {
        alert('gameOver!');
    }
    availableCards = true;
    takenCards = new Array();
});
}

function resetCards() {
takenCards[0].css({'background-image':'url(title.png)'})
takenCards[1].css({'background-image':'url(title.png)'})
takenCards = new Array();
availableCards = true;
}

$(document).ready(function() {

$('.start_game').click(function() {
    startGame();
});

 })

```