I borrowed a piece of code from somewhere, but I don’t understand it. It is kind of ajax call webservice.
function SearchMyStuff() {
$("#tblHouse").hide();
$.ajax({
type: "POST",
url: pageName + "SearchMyStuff",
data: "{'oParams':" + JSON.stringify(BuildMyStuffSearch()) + "}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (response) {
if (response.d.length > 0) {
while ($('#MyStuffBody tr').length > 1) {
$('#MyStuffBody tr:last').remove();
}
$.each(response.d, function (index, item) {
var templateRow = $('#templateMyStuff');
What I want to know is
function (index, item)
What is index and item here.
Thanks for explain it.
In other words:
is shorthand equivalent of:
Of course,it’s far more simplyfied equivalent of real
$.eachimplementation