I am new at jquery/sharepoint so I hope this is a simple question for you gurus. I am looking at somebody else code and I cannot understand how it works (magic maybe?).
In the sharepoint page I am "decoding", the JQuery code seems to get the items to be displayed from a sharepoint list. Then Jquery shows them in a table coded in the same sharepoint page.
Part of the table's code is
...<tr><td><strong>Name:</strong>
</td><td id="OffName"></td></tr>
<tr><td><strong>T POC:</strong></td><td id="TPOC"></td></tr>...
It works fine (and that's what I do not understand!!!!). I believe that <td id="OffName"></td> tells the browser to insert in that cell the value for item id="OffName"
The Jquery section of the code says:
//here it defines an arrays
var newarr = $.makeArray();
//set the field in the array (not sure why he needs to put the value in an array)
$("#OffName").text(newarr[1]);
The question is how JQuery understand what is OffName? Is the id=OffName automatically generated by SharePoint or was the id added by the programmer some where in the list? Is there a way to edit the item id in a list's element so JQUery can parse it?
I am looked everywhere for something like <div id="OffName"> but I cannot find it.
So I am lost...anybody can help?
Thanks
Luca