Gettin the jQuery the :not() selector to work
<p>In my code I have added this variable</p>

<pre><code>var spellSpace = $('td[data-word=' + listOfWords[rndWord].name + ']').hasClass('.highlight-problem:not(.right-word)');
</code></pre>

<p>and for some reason it will not work in this code</p>

<pre><code>$('.next-question').click(function () {
    $('td').removeClass('highlight-problem');
    var r = rndWord;
    while (r == rndWord) {
        rndWord = Math.floor(Math.random() * (listOfWords.length));
    }
    $('td[data-word="' + listOfWords[rndWord].name + '"]').addClass('highlight-problem');
    $('td[data-word=' + word + ']').removeClass('wrong-letter').removeClass('wrong-word').removeClass('right-letter');
    var spellSpace = $('td[data-word=' + listOfWords[rndWord].name + ']').hasClass('.highlight-problem:not(.right-word)');
    if (spellSpace) {
        addMedia();
    }
});
</code></pre>

<p>It just will not return the addMedia() function and I do not know why</p>

<p>Can anyone show me where I am going wrong?</p>
