tag. What is happening is that it retrieves the value of the
first
tag value and not the on the user clicks.
What I need is to retieve the value from the
tag the user click.
Snippet code [BEGIN]:
$(document).ready(function() {
$("p").click(function () {
var prop = $("#property_links").val();
$.post("n10-shortlist-connector.html", { web_AGENT_REF: prop});
var htmlStr = "Added to Compare Tool";
$(this).text(htmlStr);
});
});
<a style="cursor:pointer; color: #900"> Add to Compare Tool <input
type="hidden" id="property_links" value="<? echo $AGENT_REF; ?>"/></
a>