{"action":"created","issue":{"url":"https://api.github.com/repos/DataTables/DataTables/issues/646","labels_url":"https://api.github.com/repos/DataTables/DataTables/issues/646/labels{/name}","comments_url":"https://api.github.com/repos/DataTables/DataTables/issues/646/comments","events_url":"https://api.github.com/repos/DataTables/DataTables/issues/646/events","html_url":"https://github.com/DataTables/DataTables/issues/646","id":103032025,"number":646,"title":"[BUG] Buttons extension: \"Direct insertion\" with Ajax population","user":{"login":"temuri416","id":3987203,"avatar_url":"https://avatars.githubusercontent.com/u/3987203?v=3","gravatar_id":"","url":"https://api.github.com/users/temuri416","html_url":"https://github.com/temuri416","followers_url":"https://api.github.com/users/temuri416/followers","following_url":"https://api.github.com/users/temuri416/following{/other_user}","gists_url":"https://api.github.com/users/temuri416/gists{/gist_id}","starred_url":"https://api.github.com/users/temuri416/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/temuri416/subscriptions","organizations_url":"https://api.github.com/users/temuri416/orgs","repos_url":"https://api.github.com/users/temuri416/repos","events_url":"https://api.github.com/users/temuri416/events{/privacy}","received_events_url":"https://api.github.com/users/temuri416/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-08-25T14:16:14Z","updated_at":"2015-09-07T12:15:01Z","closed_at":"2015-08-25T14:24:46Z","body":"Hi,\r\n\r\n\"*Direct insertion*\" feature at https://datatables.net/extensions/buttons/ does not work if DataTables is using AJAX to fetch data.\r\n\r\n```js\r\n\r\nvar DT = $('#example').DataTable( {\r\n        \"ajax\": '../ajax/data/arrays.txt'\r\n    } );\r\n\r\nDT.buttons().container().appendTo( $('#buttonsContainer') );\r\n```\r\n\r\nNo buttons are inserted anywhere.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/DataTables/DataTables/issues/comments/138281616","html_url":"https://github.com/DataTables/DataTables/issues/646#issuecomment-138281616","issue_url":"https://api.github.com/repos/DataTables/DataTables/issues/646","id":138281616,"user":{"login":"senritsu","id":790689,"avatar_url":"https://avatars.githubusercontent.com/u/790689?v=3","gravatar_id":"","url":"https://api.github.com/users/senritsu","html_url":"https://github.com/senritsu","followers_url":"https://api.github.com/users/senritsu/followers","following_url":"https://api.github.com/users/senritsu/following{/other_user}","gists_url":"https://api.github.com/users/senritsu/gists{/gist_id}","starred_url":"https://api.github.com/users/senritsu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/senritsu/subscriptions","organizations_url":"https://api.github.com/users/senritsu/orgs","repos_url":"https://api.github.com/users/senritsu/repos","events_url":"https://api.github.com/users/senritsu/events{/privacy}","received_events_url":"https://api.github.com/users/senritsu/received_events","type":"User","site_admin":false},"created_at":"2015-09-07T12:15:01Z","updated_at":"2015-09-07T12:15:01Z","body":"can confirm this issue using DataTables 1.10.9\r\n\r\ninside a callback function called from the `initComplete` option or the `init.dt` event, `table.buttons().container()` is an empty selector, even if the `buttons` option was specified during DataTables construction."}}