{"id":2781,"date":"2014-06-25T20:28:47","date_gmt":"2014-06-25T20:28:47","guid":{"rendered":"https:\/\/allonestring.co.uk\/wp2\/?p=2781"},"modified":"2016-05-18T20:35:19","modified_gmt":"2016-05-18T20:35:19","slug":"my-first-jquery","status":"publish","type":"post","link":"https:\/\/allonestring.co.uk\/wp\/my-first-jquery\/","title":{"rendered":"my first jquery!"},"content":{"rendered":"<p>It&#8217;s taken me two days or so to get it working, but I&#8217;ve written my first jquery script. It takes the colour of the colour bar at the bottom of each post and uses the same colour for the Post comment button. Ta da! Daft, I know, but fun!<\/p>\n<p>Next I&#8217;ll try to make the comment box a related colour. And, so far, it&#8217;s working only in this post, so I&#8217;ll play with making it automatic. [update 26 June 2014 &#8211; done!]<\/p>\n<p><script src=\"http:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/1.11.1\/jquery.min.js\"><\/script><script>\/\/ <![CDATA[\n $(document).ready(function(){ var tableColour = $('td').css(\"background-color\"); console.log(tableColour); $(\"div#respond input#submit\").css(\"background-color\", tableColour ); $(\"div#respond .comment-form-author label\").css(\"background-color\", tableColour ); $(\"div#respond .comment-form-email label\").css(\"background-color\", tableColour ); $(\"div#respond .comment-form-url label\").css(\"background-color\", tableColour ); $(\"div#respond .comment-form-comment label\").css(\"background-color\", tableColour ); }); \n\/\/ ]]><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[63],"tags":[],"class_list":["post-2781","post","type-post","status-publish","format-standard","hentry","category-code"],"_links":{"self":[{"href":"https:\/\/allonestring.co.uk\/wp\/wp-json\/wp\/v2\/posts\/2781","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/allonestring.co.uk\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/allonestring.co.uk\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/allonestring.co.uk\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/allonestring.co.uk\/wp\/wp-json\/wp\/v2\/comments?post=2781"}],"version-history":[{"count":13,"href":"https:\/\/allonestring.co.uk\/wp\/wp-json\/wp\/v2\/posts\/2781\/revisions"}],"predecessor-version":[{"id":4961,"href":"https:\/\/allonestring.co.uk\/wp\/wp-json\/wp\/v2\/posts\/2781\/revisions\/4961"}],"wp:attachment":[{"href":"https:\/\/allonestring.co.uk\/wp\/wp-json\/wp\/v2\/media?parent=2781"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/allonestring.co.uk\/wp\/wp-json\/wp\/v2\/categories?post=2781"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/allonestring.co.uk\/wp\/wp-json\/wp\/v2\/tags?post=2781"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}