{"id":38,"date":"2026-04-22T03:41:00","date_gmt":"2026-04-22T03:41:00","guid":{"rendered":"https:\/\/jimfoust.webhostingforstudents.com\/wp\/?p=38"},"modified":"2026-04-22T03:41:00","modified_gmt":"2026-04-22T03:41:00","slug":"test","status":"publish","type":"post","link":"https:\/\/jimfoust.webhostingforstudents.com\/wp\/2026\/04\/22\/test\/","title":{"rendered":"Test"},"content":{"rendered":"<p><html lang=\"en\"><br \/>\n<head><br \/>\n<meta charset=\"UTF-8\"><br \/>\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><br \/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\"><br \/>\n<meta name=\"Description\" content=\"Enter your description here\"\/>\n<link rel=\"stylesheet\" href=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/twitter-bootstrap\/4.6.0\/css\/bootstrap.min.css\">\n<link rel=\"stylesheet\" href=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/font-awesome\/5.15.4\/css\/all.min.css\">\n<link rel=\"stylesheet\" href=\"assets\/css\/style.css\">\n<style>\n    .bar {\n        background: black;\n        height: 30px;\n        margin-top: 5px;\n        margin-bottom: 5px;\n        border-radius: 5px;\n        color: white;\n        line-height: 30px;\n        padding-left: 7px;\n    }<\/p>\n<p>    img {\n        border-radius: 10px;\n        max-width: 100%;\n    }\n    #bar1 {\n        transition: all 0.5s;\n    }<\/p>\n<\/style>\n<p><title>Simple Javascript Bars<\/title><br \/>\n<\/head><br \/>\n<body><\/p>\n<div class=\"container\">\n<div class=\"row\">\n<div class=\"col-12 col-md-8 col-lg-6 bg-warning p-3\">\n<h1>2024 Batting Average<\/h1>\n<h3 id=\"player\">Select player:<\/h3>\n<div class=\"bar\" id=\"bar1\"><\/div>\n<div class=\"bar\" id=\"lg_avg\"><\/div>\n<p>            <button onclick=\"ramirez()\">Jose Ramirez<\/button><br \/>\n            <button onclick=\"naylor()\">Josh Naylor<\/button><br \/>\n            <button onclick=\"straw()\">Miles Straw<\/button>\n        <\/div>\n<div class=\"col-12 col-md-4 col-lg-4 p-3\" id=\"photo\"><\/div>\n<\/p><\/div>\n<\/div>\n<p><script><\/p>\n<p>    var bar1 = document.querySelector('#bar1');\n    var player = document.querySelector('#player');\n    var lg_avg = document.querySelector('#lg_avg');\n    var photo = document.querySelector('#photo');<\/p>\n<p>    bar1.style.width = \"0px\";\n    lg_avg.style.width = \"48.8%\";\n    lg_avg.textContent = \"League Average: .244\";<\/p>\n<p>    function ramirez() {\n        bar1.style.width = \"49.4%\";\n        bar1.textContent = \".247\";\n        player.textContent = \"Jose Ramirez\";\n        photo.innerHTML=\"<img src='https:\/\/thumbor.forbes.com\/thumbor\/711x473\/https:\/\/specials-images.forbesimg.com\/imageserve\/617c336b7f14e0f924fcf7db\/Indians-Rangers-Baseball\/960x0.jpg?fit=scale' alt='Jose Ramirez slides'>\";\n        barColor();\n    }<\/p>\n<p>    function naylor() {\n        bar1.style.width = \"68.0%\";\n        bar1.textContent = \".340\";\n        player.textContent = \"Josh Naylor\";\n        photo.innerHTML=\"<img src='https:\/\/storage.googleapis.com\/afs-prod\/media\/8922f877a6e1491daeb0408be4cbe9cc\/3000.jpeg' alt='Josh Naylor poses with bat'>\";  \n        barColor();      \n    }<\/p>\n<p>    function straw() {\n        bar1.style.width = \"35.0%\";\n        bar1.textContent = \".175\";\n        player.textContent = \"Miles Straw\";\n        photo.innerHTML=\"<img src='https:\/\/imageio.forbes.com\/specials-images\/imageserve\/6112ed8934da3d1563ae033c\/0x0.jpg?format=jpg&#038;width=1200' alt='Myles Straw makes a catch'>\";\n        barColor();        \n    }<\/p>\n<p>    function barColor() {\n        if (bar1.textContent >= \".244\") {\n            bar1.style.background=\"green\";\n        } else {\n            bar1.style.background=\"red\";\n        }\n    }<\/p>\n<p><\/script><br \/>\n<\/body><br \/>\n<\/html><\/p>\n<p><!--\n\n    onclick=\"naylor()\"\n\n    transition: all 0.5s;\n\n    var photo = document.querySelector('#photo');\n\n    photo.innerHTML=\"<img src='https:\/\/storage.googleapis.com\/afs-prod\/media\/8922f877a6e1491daeb0408be4cbe9cc\/3000.jpeg' alt='Josh Naylor poses with bat'>\";\n\n    photo.innerHTML=\"<img src='https:\/\/thumbor.forbes.com\/thumbor\/711x473\/https:\/\/specials-images.forbesimg.com\/imageserve\/617c336b7f14e0f924fcf7db\/Indians-Rangers-Baseball\/960x0.jpg?fit=scale' alt='Jose Ramirez slides'>\";\n\n    photo.innerHTML=\"<img src='https:\/\/imageio.forbes.com\/specials-images\/imageserve\/6112ed8934da3d1563ae033c\/0x0.jpg?format=jpg&width=1200' alt='Myles Straw makes a catch'>\";\n\n    \n    function barColor() {\n        if (bar1.textContent >= \".244\") {\n            bar1.style.background=\"green\";\n        } else {\n            bar1.style.background=\"red\";\n        }\n    }\n--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Simple Javascript Bars 2024 Batting Average Select player: Jose Ramirez Josh Naylor Miles Straw<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"pagelayer_contact_templates":[],"_pagelayer_content":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-38","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/jimfoust.webhostingforstudents.com\/wp\/wp-json\/wp\/v2\/posts\/38","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jimfoust.webhostingforstudents.com\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jimfoust.webhostingforstudents.com\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jimfoust.webhostingforstudents.com\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jimfoust.webhostingforstudents.com\/wp\/wp-json\/wp\/v2\/comments?post=38"}],"version-history":[{"count":1,"href":"https:\/\/jimfoust.webhostingforstudents.com\/wp\/wp-json\/wp\/v2\/posts\/38\/revisions"}],"predecessor-version":[{"id":39,"href":"https:\/\/jimfoust.webhostingforstudents.com\/wp\/wp-json\/wp\/v2\/posts\/38\/revisions\/39"}],"wp:attachment":[{"href":"https:\/\/jimfoust.webhostingforstudents.com\/wp\/wp-json\/wp\/v2\/media?parent=38"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jimfoust.webhostingforstudents.com\/wp\/wp-json\/wp\/v2\/categories?post=38"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jimfoust.webhostingforstudents.com\/wp\/wp-json\/wp\/v2\/tags?post=38"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}