{"id":3464,"date":"2015-01-19T13:29:16","date_gmt":"2015-01-19T19:29:16","guid":{"rendered":"http:\/\/bililite.com\/blog\/?p=3464"},"modified":"2015-01-19T13:31:25","modified_gmt":"2015-01-19T19:31:25","slug":"updated-fn-status","status":"publish","type":"post","link":"https:\/\/bililite.com\/blog\/2015\/01\/19\/updated-fn-status\/","title":{"rendered":"Updated <code>$.fn.status<\/code>"},"content":{"rendered":"<p>I've added the ability to use the console with my <a href=\"http:\/\/bililite.com\/blog\/2013\/12\/12\/new-jquery-plugin-status\/\" title=\"New jQuery plugin, status\">status plugin<\/a>, so you can do<\/p>\n<pre><code class=\"language-javascript\" >$(console).status({\r\n  run: $.post(url, {data: data}).then(\r\n    function() { return 'Data Saved' },\r\n    function() { return new Error('Data Not saved') }\r\n  )\r\n});<\/pre>\n<p><\/code><br \/>\nAnd the output will go to the console rather than to an element on the page.<br \/>\nFor simple output to the console, this is far more complicated than <code class=\"language-javascript\" >console.log<\/code>, but it works with the rest of the <code class=\"language-javascript\" >status<\/code> options. Input is with <code class=\"language-javascript\" >window.prompt<\/code>, since I don't know how to get input from the console.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I've added the ability to use the console with my status plugin, so you can do $(console).status({ run: $.post(url, {data: data}).then( function() { return 'Data Saved' }, function() { return new Error('Data Not saved') } ) }); And the output will go to the console rather than to an element on the page. For simple [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,5],"tags":[],"_links":{"self":[{"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/posts\/3464"}],"collection":[{"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/comments?post=3464"}],"version-history":[{"count":5,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/posts\/3464\/revisions"}],"predecessor-version":[{"id":3469,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/posts\/3464\/revisions\/3469"}],"wp:attachment":[{"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/media?parent=3464"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/categories?post=3464"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/tags?post=3464"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}