Disabling link doesn't work
<p>I'm working on a calendar and want to disable a link after a form is submitted. </p>

<p>The calendar consists of links (with <code>rel="box"</code>) which open a lightbox with a reservation form. Once the form is filled in, i want to disable the according link by setting the rel to <code>rel="noshow"</code>. </p>

<p>The script first <em>should</em> check the rel attribute of the link. If it is <code>rel="box"</code> a lightbox is openend, when it's empty the normal destination will be followed and when it's <code>rel="noshow"</code> nothing should happen..</p>

<p>I currently have the following code, which opens a lightbox and follows the normal destination when desired but the whole <code>rel="noshow"</code> part won't seem to work...</p>

<pre><code>
 $("a").click(function(){
  if(this.rel == "noshow"){
   this.preventDefault();
   return false;
  }else if(this.rel == "box"){
   [..]
   $("#closeBox").click(function(c) {
    c.preventDefault();
    var parentCell = $("#date"+linkID[1]+linkID[2]+linkID[3]);
    var childLink = parentCell.children();
    parentCell.css("background-image","url('reserved-green.jpg')");
    childLink.attr("rel","noshow");
    alert(childLink.attr("rel"));
   });
   [..]
</code></pre>

<p>When the form is closed the alert() says noshow but when i click on the link it just follows the href value</p>

<p>What am i doing wrong here?</p>
