first try with buttons

first try with buttons


i have a simple code , where a user can check if a button has redcolor by clicking on one of the buttons, but for some reason the code wont run. 



<html>
<head>
<script type="text/javascript">
//<![CDATA[
try{if (!window.CloudFlare) {var CloudFlare=[{verbose:0,p:0,byc:0,owlid:"cf",bag2:1,mirage2:{profile:false},oracle:0,paths:{cloudflare:"/cdn-cgi/nexp/dok8v=02fcfa4f56/"},atok:"44278e6492cdf14e3f8920715f3f1b2c",petok:"816ebc377b160c3227ae70531c1d55ae7b8484a3-1394234930-86400",zone:"mkyong.com",rocket:"0",apps:0}];var a=document.createElement("script"),b=document.getElementsByTagName("script")[0];a.async=!0;a.src="//ajax.cloudflare.com/cdn-cgi/nexp/dok8v=221574e73d/cloudflare.min.js";b.parentNode.insertBefore(a,b);}}catch(e){};
//]]>
</script>
<style type="text/css">
  .redColor { 
  background:red;
  }
  .blueColor { 
  background:blue;
  }
 </style>
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
</head>
<body>
  <h1>jQuery check if an element has a certain class</h1>

  <div class="redColor" id = "1">This is a div tag with class name of "redColor"</div>
  
  
  <div class="redColor" id ="2" >This is a div tag with class name of "redColor"</div>

  
  <p>
  <button id="isTest">is('.redColor')</button>
  <button id="hasClassTest">hasClass('.redColor')</button>
  <button id="reset">reset</button>
  </p>
<script type="text/javascript">
    $("#isTest").click(function () {
 if($("#1").is('.redColor')){
  $("#1").addClass('blueColor');
 }
 
    });
$("#hasClassTest").click(function () {
 if($("#1").hasClass('.redColor')){
  $("#1").addClass('blueColor');
 }
 
    });
$("#reset").click(function () {
 location.reload();
    });
</script>
</body>
</html>