How to get a single value of div class in jquery
Hi,
iam having online shopping site.i want to show image with price in quick view.the issue is if i use $('.product-item').find('.prices').text(); it show all products prices like this $24 $34 $45.Because the div class product-item is getting looped.i want to show clicked image price only.How do i do this.
$(".dialogify").bind("click", function(e) {
e.preventDefault();
var productprice= $('.product-item').find('.prices').text();
});
<div class="product-item" data-productid="@Model.Id" style="position:relative" id="item">
<div class="add-info">
<div class="prices" id="pri">
@if (!String.IsNullOrEmpty(Model.ProductPrice.OldPrice))
{
<span class="price old-price">@Model.ProductPrice.OldPrice</span>
}
<span class="price actual-price" id="price">@Model.ProductPrice.Price</span>
</div>
</div>
</div>