Clear multi divs with jquery
<p>Quick question. If i am trying to clear multipul divs with the same class all at once is there a jQuery short cut to doing this? I tried <code>$('.clearit').empty();</code> and that does not seem to work at all (none on the divs with that class are being cleared). Could I be doing this wrong or does this just not work? Let me know, I tried <code>$('.clearit').html('');</code>. Also I have this along with other code that runs after it in jquery and everything else runs as it should. I debugged the code and it seems to run the funtion and move on with no errors but the div content is not cleared. Here is a sample of the divs:</p>

<pre><code>&lt;center&gt;&lt;div class="clearit" id="container2"&gt;Loading the player ...&lt;/div&gt;&lt;/center&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;center&gt;&lt;div class="clearit" id="container3"&gt;Loading the player ...&lt;/div&gt;&lt;/center&gt;
&lt;/li&gt;
&lt;li&gt;  
&lt;center&gt;&lt;div class="clearit" id="container4"&gt;Loading the player ...&lt;/div&gt;&lt;/center&gt;
</code></pre>

<p>and here is the code for one of the handlers. Please note everything in there works except for the <code>$('.clearit').html('');</code>. </p>

<pre><code>$('.thumbNav li a').click(function(){
    $('.clearit').html('');


var str = $(this).html();
var pattern = /[0-9]+/g;
var matches = str.match(pattern);
var myInteger = parseInt(matches);
//variable for player
var container = "container"+myInteger;
var what = 'skill'+myInteger;
var location = "https://aliahealthcare.com/videofetcher.php?id=skill"+myInteger;
player(container,what,location);  

$('#'+what).attr('selected', 'selected');   


    });
</code></pre>

<p>To anyone still helping me, THANKS SO MUCH! also i have modified the site so you no longer need a login to get in so you can see it in action for yourself. Please use the code above as reference in finding the javascript. (It is all located in vid.php) Thanks</p>

<p><a href="https://aliahealthcare.com/vid.php" rel="nofollow">https://aliahealthcare.com/vid.php</a></p>

<p>Also i just discovered something interesting. The li's above are part of a ul with in id of slider. When i do <code>$('#slider').html('');</code> or <code>$('#slider').empty();</code> It works but it clears all the div thus the players that load inside those divs dont load. All i need to do is just clear the players so you cant have multipul players running at the same time. </p>
