{"action":"opened","issue":{"url":"https://api.github.com/repos/DataTables/DataTables/issues/608","labels_url":"https://api.github.com/repos/DataTables/DataTables/issues/608/labels{/name}","comments_url":"https://api.github.com/repos/DataTables/DataTables/issues/608/comments","events_url":"https://api.github.com/repos/DataTables/DataTables/issues/608/events","html_url":"https://github.com/DataTables/DataTables/issues/608","id":96713446,"number":608,"title":"Documentation for rows().every()","user":{"login":"mpryvkin","id":7396482,"avatar_url":"https://avatars.githubusercontent.com/u/7396482?v=3","gravatar_id":"","url":"https://api.github.com/users/mpryvkin","html_url":"https://github.com/mpryvkin","followers_url":"https://api.github.com/users/mpryvkin/followers","following_url":"https://api.github.com/users/mpryvkin/following{/other_user}","gists_url":"https://api.github.com/users/mpryvkin/gists{/gist_id}","starred_url":"https://api.github.com/users/mpryvkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpryvkin/subscriptions","organizations_url":"https://api.github.com/users/mpryvkin/orgs","repos_url":"https://api.github.com/users/mpryvkin/repos","events_url":"https://api.github.com/users/mpryvkin/events{/privacy}","received_events_url":"https://api.github.com/users/mpryvkin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-23T02:44:13Z","updated_at":"2015-07-23T02:44:13Z","closed_at":null,"body":"In the example below `rowIdx` is not defined anywhere. Although it may be perfectly valid code with `rowIdx` defined globally, however with this example it makes sense to use something like `var rowIdx = this.index();` inside the function.\r\n\r\n<pre>\r\nvar table = $('#example').DataTable();\r\n \r\ntable.rows().every( function () {\r\n    this\r\n        .child(\r\n            $(\r\n                '&lt;tr&gt;'+\r\n                    '&lt;td&gt;'+rowIdx+'.1&lt;/td&gt;'+\r\n                    '&lt;td&gt;'+rowIdx+'.2&lt;/td&gt;'+\r\n                    '&lt;td&gt;'+rowIdx+'.3&lt;/td&gt;'+\r\n                    '&lt;td&gt;'+rowIdx+'.4&lt;/td&gt;'+\r\n                '&lt;/tr&gt;'\r\n            )\r\n        )\r\n        .show();\r\n} );\r\n</pre>"}}