user1021531
user1021531

Reputation: 477

getRowData in jqgrid

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

Answers (1)

ipr101
ipr101

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 tds inside the ind object.

Upvotes: 1

Related Questions