{"id":16170,"date":"2016-06-20T18:35:43","date_gmt":"2016-06-20T18:35:43","guid":{"rendered":"http:\/\/www.oracletutoring.ca\/blog\/?p=16170"},"modified":"2018-11-14T05:09:31","modified_gmt":"2018-11-14T05:09:31","slug":"web-design-jquery-css-function","status":"publish","type":"post","link":"https:\/\/www.oracletutoring.ca\/blog\/web-design-jquery-css-function\/","title":{"rendered":"Web Design:  jQuery css() function"},"content":{"rendered":"<h1>The tutor shows another jQuery function:  css()<\/h1>\n<p><script src=\"https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/1.12.2\/jquery.min.js\"><\/script><br \/>\n<script src=\"\/..\/jquery\/jq_jun20_16.js\"><\/script><\/p>\n<p><button id=\"jun_20_2016\" style=\"display:block;margin:auto\">Click me for css() demo:)<\/button><br \/>\n&NewLine;<\/p>\n<p style=\"font-size:125%;text-align:center\" id=\"p_jun_20_2016\" >This text and background will both change color.<\/p>\n<p>&NewLine;<br \/>\n<button id=\"jun_20_2016_b\" style=\"display:block;margin:auto\">Click me to reset:)<\/button><br \/>\nThe jQuery code that changes the text from ordinary to white on red:<\/p>\n<p style=\"font-family:monospace;font-size:110%;background-color:rgb(255,240,240)\">\n$(&#8220;#p_jun_20_2016&#8221;).css({&#8220;color&#8221;:&#8221;rgb(255,255,255)&#8221;,&#8221;background-color&#8221;:&#8221;rgb(150,10,10)&#8221;});\n<\/p>\n<p>I&#8217;ll be giving more coverage on jQuery in future posts:)<\/p>\n<p>Source:<\/p>\n<p><a href=\"http:\/\/www.w3schools.com\/jquery\/jquery_get_started.asp\">w3schools<\/a><\/p>\n<p>Pollock, John.  <u>jQuery:  A Beginner&#8217;s Guide<\/u>.  New York:  McGraw-Hill, 1994.<\/p>\n<p>Jack of <a href=\"https:\/\/www.oracletutoring.ca\">Oracle Tutoring by Jack and Diane,<\/a> Campbell River, BC.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The tutor shows another jQuery function: css() Click me for css() demo:) &NewLine; This text and background will both change color. &NewLine; Click me to reset:) The jQuery code that changes the text from ordinary to white on red: $(&#8220;#p_jun_20_2016&#8221;).css({&#8220;color&#8221;:&#8221;rgb(255,255,255)&#8221;,&#8221;background-color&#8221;:&#8221;rgb(150,10,10)&#8221;}); &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/www.oracletutoring.ca\/blog\/web-design-jquery-css-function\/\"> <span class=\"screen-reader-text\">Web Design:  jQuery css() function<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1631,458,837],"tags":[1625,1657],"class_list":["post-16170","post","type-post","status-publish","format-standard","hentry","category-css","category-technology","category-web-design","tag-jquery","tag-jquery-css-function"],"_links":{"self":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/16170","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/comments?post=16170"}],"version-history":[{"count":20,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/16170\/revisions"}],"predecessor-version":[{"id":36166,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/16170\/revisions\/36166"}],"wp:attachment":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/media?parent=16170"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/categories?post=16170"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/tags?post=16170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}