Ok First let me say that I was just starting to learn jQuery, and I took on various issues so that I could learn faster. Today I have a very newbie, so I apologize if the answer to this is obvious. I use jQuery to display a specific value when I click on the corresponding list.
I do not know what I am doing wrong. Basically, I created an unordered list, and what I want to achieve is by clicking on each link, change the range value, which should be specific for each list item (so each list item will have a different range value). But the script below does not work. Any idea what I'm doing wrong or what should I do ?: -
<ul class="stag">
<li><a class="$200" href="#d1">Display</a></li>
<li><a class="$300" href="#d2">Shirt</a></li>
<li><a class="$400" href="#d3">Dress</a></li>
<li class="amount"></li>
**<span>$200</span>**
</ul>
this is jQuery code: -
$(document).ready(function() {
("ul.stag li").click(function(){
var activePd = $(this).find("a").attr("class");
$(".stag span").html(activePd.html());
return false;
});
});
Can anyone help ?. Thanks guys:)
user850814