Reputation: 477
getRowData
function in jqgird,I notice that there is a selector look like "$("td", ind)"
,
I haven't seen this before, and more weird, It got different results when worked in chrome and firefox.
I known first parameter means select all "td"
s,but what's the use of second parameter?
Upvotes: 0
Views: 738
Reputation: 24236
The second argument is the context, from the docs -
By default, selectors perform their searches within the DOM starting at the document root. However, an alternate context can be given for the search by using the optional second parameter to the $() function.
Internally, selector context is implemented with the .find() method, so $('span', this) is equivalent to $(this).find('span').
From - http://api.jquery.com/jQuery/
So in your example the code will be searching for td
s inside the ind
object.
Upvotes: 1