{"id":568,"date":"2012-03-25T12:20:57","date_gmt":"2012-03-25T17:20:57","guid":{"rendered":"http:\/\/blog.xfloyd.net\/?p=568"},"modified":"2012-03-25T21:46:13","modified_gmt":"2012-03-26T02:46:13","slug":"datatables-magic-select-all","status":"publish","type":"post","link":"http:\/\/xfloyd.net\/blog\/?p=568","title":{"rendered":"DataTables magic! (select all)"},"content":{"rendered":"<p>Here it goes, I&#8217;m trying to get select all, in a fancy way. Staring <a href=\"http:\/\/datatables.net\/forums\/discussion\/276\/newbie-check-all-checkboxes-fonction\/p1\" target=\"_blank\">Here,<\/a> I guess I should start <a href=\"http:\/\/datatables.net\/release-datatables\/extras\/TableTools\/select_multi.html\" target=\"_blank\">here<\/a>, since it&#8217;s already nicely done.<!--more--><br \/>\nThen little more magic from Allen <a href=\"http:\/\/www.datatables.net\/forums\/discussion\/3755\/tabletools-multirow-select-print-only-selected-rows\/p1\">here<\/a>, and one should be on their way.<\/p>\n<pre>\"fnInitComplete\" : function () {\r\n$('#check_all').click( function() {\r\n$('input[name*=\\'selected\\']', oTable.fnGetFilteredNodes()).attr('checked',this.checked);\r\n});\r\n}, \r\n\r\n$('input', tab.fnGetFilteredNodes()).attr('checked','checked');\r\n\r\n$('#check_all').click( function() {\r\n$('input', oTable.fnGetFilteredNodes()).attr('checked','checked');\r\nreturn false; \/\/ to avoid refreshing the page\r\n});\r\n\r\n$('#check_all').click( function() {\r\n$('input', oTable.fnGetFilteredNodes()).attr('checked',this.checked);\r\n});<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Here it goes, I&#8217;m trying to get select all, in a fancy way. Staring Here, I guess I should start here, since it&#8217;s already nicely done.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"_links":{"self":[{"href":"http:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/568"}],"collection":[{"href":"http:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/xfloyd.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=568"}],"version-history":[{"count":9,"href":"http:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/568\/revisions"}],"predecessor-version":[{"id":570,"href":"http:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/568\/revisions\/570"}],"wp:attachment":[{"href":"http:\/\/xfloyd.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=568"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/xfloyd.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=568"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/xfloyd.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=568"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}