Jquery and CSS background change
<p>I am having problem with the following line:</p>

<pre><code>document.getElementById("giftcard").getElementsByTagName("label").style.backgroundImage ="url(giftcard_icon-d.jpg)";
</code></pre>

<p>I am trying to change background image after clicking a <code>label</code>.</p>

<p>I do have 5 <code>label</code>s in a page, but when i click on <code>label</code>, the background should change it. Other labels should be reset to use this <code>giftcard_icon-d.jpg</code> image as their background.  </p>

<p>How can I fix this?</p>

<pre><code>$(document).ready(function() {
    $('#giftcard label').click(function() {
       document.getElementById("giftcard").getElementsByTagName("label").style.backgroundImage ="url(giftcard_icon-d.jpg)";
       this.style.backgroundImage ="url(giftcard_icon-a.jpg)";      
}); 
</code></pre>
