trying to blank html on all divs of a class

trying to blank html on all divs of a class

Hi All 

I have been trying this for awhile now , I have a number of divs class=warningmessage id=warningmessage that i would like to set the html content to blank 

I was trying this 

<script>
$( document.body ).ready(function() {
var x=1;
  $( "div.warningmessage" ).each(function( i ) {
   $("div.warningmessage").html("");
  });

</script>

but it doesnt seem to replace the html the path to the div is pretty complex but as long as the DOM renders it I should be able to visit each one using each. right and then blank them out ?

any ideas?