disable click function

disable click function

I have an image map with various areas on it.  A user can click on the various areas and something happens. That said, I sometimes need to disable the ability to click on some areas.  For instance areas whose id attribute contains 0 0.  I have the code to split the id and grab whether the values are 0 or 1 and the alert pops up when one has 0 0 in the id but it's still clickable.  I thought .unbind would do the trick, but it isn't.  the alert is simply for testing.

Any help would be much appreciated.

Thanks in advance,
Twitch

  1.  $('area').each(function()
  2.    {
  3.    // Use the each() method to gain access to each elements id
  4.   var idToDisable = $(this).attr("id");//get id of area
  5.   var splitID = idToDisable.split("_");
  6.   if (splitID[3] == 0 && splitID[5] == 0){
  7.   alert(splitID[3]+splitID[5]);
  8.  $(this).unbind('click');
  9.   }else{

  10.   }
  11. });