Chao  LI Chao LI - 2 months ago 5
jQuery Question

How to get the specific value when click

{volist name="title" id="title"}
<a class="outer" href="#"><span class="inner"><b class="text">{$title.productname}</b></span></a>
{/volist}


Does anyone know how to get the text value of {$title.productname} when I click on a specific one?
It has six items and I just want to get the one I clicked.

Thanks
Lee

Answer
$('a.outer').on('click',function(){
  alert($(this).find('.text').text());
});