I have the following code:
$(document.body).click(function() {
$(".content").each(function(i) {
$(this).
});
});
How can I retrieve the value of the first hidden field within $(this)?
I have the following code:
$(document.body).click(function() {
$(".content").each(function(i) {
$(this).
});
});
How can I retrieve the value of the first hidden field within $(this)?
You can use :hidden and :first filter selectors like this:
$(document.body).click(function() {
$(".content").each(function(i) {
$(':hidden:first', $(this)).val();
});
});