[jQuery] Get the input value of "ANY" element <p> tag

[jQuery] Get the input value of "ANY" element <p> tag


Hi Guys,
I am having difficulty getting the value of a specific value contained
in a

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>

// many of these tags on the page
Snippet code [END]:
view page: http://nwbeta.itproz.co.uk/residenti...tion=Liverpool
If viewing the site when you click "add to compare list" it will
change to "Added to compare list"
All help appreciated,
Thanks in advance.