JQuery Click event crashes program with no console errors
<p>EDIT**</p>

<p>In a game I am creating I use the next question button to move onto other questions in the grid if the user is having trouble with the current one. At the moment I have had real problems with it as it keeps on crashing my program, and not giving any console errors. The last problem I had with it was that it said "too much recursion". Since then I thought I had sorted the problem, but I have just done a few tests and it crashes every time.</p>

<p>This is the click event for the button...</p>

<pre><code>//Next question click event
$('.next-question').bind("click", function() {
    $('td').removeClass('highlight-problem');
    shuffleEqually(listOfWords);
    shuffleEqually(nextWordIndexes);
    var rndWord = nextWordIndexes[Math.floor(Math.random())];
    var rndWord = nextWordIndexes[2];
    //Adds and removes nesesary classes
    $('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('right-word');
    if (spellSpace) {
        $('.next-question').trigger('click');
    } else {
        $("#hintSound").attr('src', listOfWords[rndWord].audio);
        hintSound.play();
        $("#hintPic").attr('src', listOfWords[rndWord].pic);
        $('#hintPicTitle').attr('title', listOfWords[rndWord].hint);
    }
});
</code></pre>

<p>I think it may have something to do with the if statement, but have tried changing it to this..</p>

<pre><code>if (spellSpace == false) {

    $("#hintSound").attr('src', listOfWords[rndWord].audio);
    hintSound.play();
    $("#hintPic").attr('src', listOfWords[rndWord].pic);
    $('#hintPicTitle').attr('title', listOfWords[rndWord].hint);
}
</code></pre>

<p>and it makes it even worse</p>

<p>ShuffleEqually:</p>

<pre><code>//Shuffles words to randomize
shuffleEqually(nextWordIndexes);
var shuffledWords = [];
shuffledWords = chosenWords.sort(function () {
    return 0.5 - Math.random();
});

function shuffleEqually(a1, a2) {
    var arrays = [];
    if (typeof a1 === 'object' &amp;&amp; a1.length &gt; 0) {
        arrays.push(a1);
    }
    if (typeof a2 === 'object' &amp;&amp; a2.length &gt; 0) {
        arrays.push(a2);
    }
    var minLength = arrays[0].length;
    jQuery.each(arrays, function (i, a) {
        minLength = a.length &lt; minLength ? a.length : minLength;
    });
    var randoms = [];
    for (i = 0; i &lt; minLength; i++) {
        randoms.push(Math.random());
    }
    jQuery.each(arrays, function (i, a) {
        var i = minLength;
        while (i--) {
            var p = parseInt(randoms[i] * minLength);
            var t = a[i];
            a[i] = a[p];
            a[p] = t;
        }
    });
};
</code></pre>

<p>Hint sound:</p>

<pre><code>var hintSound = $("#hintSound")[0];
</code></pre>
