{"id":3357,"date":"2020-07-30T17:05:46","date_gmt":"2020-07-30T11:35:46","guid":{"rendered":"http:\/\/testing.techfusiontechnologies.com\/wordpress\/?page_id=3357"},"modified":"2020-07-30T17:05:46","modified_gmt":"2020-07-30T11:35:46","slug":"bmi-calculator","status":"publish","type":"page","link":"https:\/\/atcfizjoterapia.pl\/index.php\/bmi-calculator\/","title":{"rendered":"BMI Calculator"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"3357\" class=\"elementor elementor-3357\">\n\t\t\t\t\t\t<div class=\"elementor-section elementor-top-section elementor-element elementor-element-2f78e040 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"2f78e040\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-2bf4a227\" data-id=\"2bf4a227\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-section elementor-inner-section elementor-element elementor-element-77b4b709 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"77b4b709\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-inner-column elementor-element elementor-element-15890bfc\" data-id=\"15890bfc\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-4c3d8e7b elementor-widget elementor-widget-Bmr_Bmi\" data-id=\"4c3d8e7b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"Bmr_Bmi.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"pt-bmi-calc\">\r\n   <div class=\"row\">\r\n      <div class=\"col-lg-6\">\r\n         <div class=\"row\">\r\n            <div class=\"col-lg-12\">\r\n              <div class=\"pt-section-title-box \">   \r\n                  <span class=\"pt-section-sub-title\">BMi<\/span>                  <h5 class=\"pt-section-title\">What is BMi.<\/h5>                  <p class=\"pt-section-description\">Lorem Ipsum is simply dummy text of the printing and typesetting industry.<\/p>   \r\n               <\/div>\r\n            <\/div>\r\n            <div class=\"col-lg-6\">               \r\n               <input type=\"text\" id=\"heightInFeet\" class=\"form-control\" placeholder=\"Height \/ Inch\">\r\n            <\/div>\r\n            <div class=\"col-lg-6\">\r\n               <input type=\"text\" id=\"weight\" class=\"form-control\" placeholder=\"Weight \/ lbs\">\r\n            <\/div>\r\n            <div class=\"col-lg-6\">\r\n               <input type=\"text\" id=\"age\" class=\"form-control\" placeholder=\"Age\">\r\n            <\/div>\r\n            <div class=\"col-lg-6\">\r\n               <select class=\"form-control\" id=\"gender\">\r\n                  <option value=\"\">Select Gender<\/option>\r\n                  <option value=\"male\">Male<\/option>\r\n                  <option value=\"female\">Female<\/option>\r\n               <\/select>\r\n            <\/div>\r\n            <div class=\"pf-form col-lg-12\">\r\n               <select class=\"pf-bmi-select2 select2-hidden-accessible\" name=\"activity_level\" tabindex=\"-1\" aria-hidden=\"true\">\r\n                  <option value=\"\">Select an activity factor:<\/option>\r\n                  <option value=\"little\">Little or no Exercise \/ desk job<\/option>\r\n                  <option value=\"light\">Light exercise \/ sports 1 \u2013 3 days\/ week<\/option>\r\n                  <option value=\"moderate\">Moderate Exercise, sports 3 \u2013 5 days \/ week<\/option>\r\n                  <option value=\"heavy\">Heavy Exercise \/ sports 6 \u2013 7 days \/ week<\/option>\r\n                  <option value=\"very_heavy\">Very heavy exercise\/ physical job \/ training 2 x \/ day<\/option>\r\n               <\/select>\r\n            <\/div>\r\n            \r\n                        <div class=\"col-lg-6 \">\r\n               <a href=\" javascript:void(0)\" class=\"pt-button submitButton\" id=\"btn-result\"><span>Calculate<\/span><\/a>\r\n            <\/div> \r\n                     \r\n         <\/div>\r\n      <\/div>\r\n      <div class=\"col-lg-6  align-self-center\">\r\n         <div class=\"pf-bmi-content\">\r\n         <table>\r\n            <thead>\r\n               <tr class=\"pf-bmi-heading\">\r\n                  <th>BMI<\/th>\r\n                  <th>Weight Status<\/th>\r\n               <\/tr>\r\n            <\/thead>\r\n            <tbody>\r\n               <tr>\r\n                  <td>Below 18.5<\/td>\r\n                  <td>Underweight<\/td>\r\n               <\/tr>\r\n               <tr>\r\n                  <td>18.5 - 24.9<\/td>\r\n                  <td>Healthy<\/td>\r\n               <\/tr>\r\n               <tr>\r\n                  <td>25.0 - 29.9<\/td>\r\n                  <td>Overweight<\/td>\r\n               <\/tr>\r\n               <tr>\r\n                  <td>30.0 - and Above<\/td>\r\n                  <td>Obese<\/td>\r\n               <\/tr>\r\n            <\/tbody>\r\n         <\/table>\r\n      <\/div>\r\n         <div class=\"pf-bmi-info\">\r\n            <span>\r\n            <strong>BMR<\/strong> Metabolic Rate \/ <strong>BMI<\/strong> Body Mass Index <\/span>\r\n         <\/div>\r\n      <\/div>\r\n      <div id=\"pt-result\">\r\n               \r\n      <\/div>\r\n   <\/div>\r\n<\/div>\r\n<script type=\"text\/javascript\">\r\n   jQuery('#pt-result').hide();\r\n   \r\n   var submitButton = document.querySelector(\".submitButton\");\r\n   \r\n   function run() {\r\n   \r\n   \r\n   \/\/ Crating Variables\r\n   var heightInFeet = Number(document.querySelector(\"#heightInFeet\").value);\r\n   \r\n   var weight = Number(document.querySelector(\"#weight\").value);\r\n   var age = Number(document.querySelector(\"#age\").value);\r\n   var mgender = false,fgender = false , bmr;\r\n   var gender = document.querySelector(\"#gender\");\r\n   var result = document.querySelector(\"#pt-result\");\r\n   var status = '';\r\n   if(heightInFeet == '' )\r\n   {\r\n   jQuery('#pt-result').html('<div class=\"col-lg-12\"><p class=\"pt-result-display\">Please Enter Height<\/p><\/div>');\r\n   jQuery('#pt-result').fadeIn('slow');\r\n   return;\r\n   }\r\n   if(age == '' )\r\n   {\r\n   jQuery('#pt-result').html('<div class=\"col-lg-12\"><p class=\"pt-result-display\">Please Enter Age<\/p><\/div>');\r\n   jQuery('#pt-result').fadeIn('slow');\r\n   return;\r\n   }\r\n   \r\n   if(gender.value == \"male\")\r\n   {\r\n   mgender = true;\t\r\n   }\r\n   if(gender.value == \"female\")\r\n   {\r\n   fgender = true;\t\r\n   }\r\n   \r\n   if(!mgender && !fgender)\r\n   {\r\n   jQuery('#pt-result').html('<div class=\"col-lg-12\"><p class=\"pt-result-display\">Please Select Gender<\/p><\/div>');\r\n   jQuery('#pt-result').fadeIn('slow');\r\n   return;\r\n   }\r\n   \r\n   var height = ((heightInFeet * 12));\r\n   var heightInMetre = (height \/ 39.37);\r\n   var heightInCm = (heightInMetre * 100);\r\n   var bmi = (weight * 703) \/ (heightInFeet * heightInFeet);\r\n   var hnweight = Number.parseFloat(24.9 * (heightInMetre * heightInMetre)).toFixed(2);\r\n   var lnweight = Number.parseFloat(18.5 * (heightInMetre * heightInMetre)).toFixed(2);\r\n   \r\n   \r\n   \r\n   \r\n   if (bmi < 18.5) {\r\n   status = \"Under Weight\";\r\n   } else if (bmi <= 24.9) {\r\n   status = \"Healthy\";\r\n   } else if (bmi <= 29.9) {\r\n   status = \"Over Weight\";\r\n   } else if (bmi <= 34.9) {\r\n   status = \"Class I obesity\";\r\n   } else if (bmi <= 39.9) {\r\n   status = \"Class II obesity\";\r\n   } else if (bmi >= 40) {\r\n   status = \"Class III obesity\";\r\n   }\r\n   \r\n   \/\/ Calculating BMR\r\n   \r\n   \r\n   \r\n   bmi = bmi.toFixed(2);\r\n   \/\/ nweightDisplay.innerHTML = `${lnweight} KG to ${hnweight} KG`;\r\n   \/\/nweightDisplay.innerHTML = lnweight + \" KG to \" + hnweight + \" KG\";\r\n   \r\n   if (fgender && age != \"\") {\r\n   var bmrf = (665 + (9.6 * weight) + (1.8 * heightInCm) - (4.7 * age));\r\n   \r\n   bmr = bmrf.toFixed(2);\r\n   \r\n   } else if (mgender&& age != \"\") {\r\n   var bmrm = (66 + (13.7 * weight) + (5 * heightInCm) - (6.8 * age));\r\n   bmr = bmrm.toFixed(2);\r\n   } \r\n   \r\n   jQuery('#pt-result').html('<div class=\"col-lg-12\"><p class=\"pt-result-display\">BMI: '+bmi+' \/ BMR: '+bmr+' \/ Status: '+status+' \/ Normal Weight '+lnweight+'+ KG to '+hnweight+' KG<\/p><\/div>');\r\n   jQuery('#pt-result').fadeIn('slow');\r\n   \r\n   \r\n   }\r\n   submitButton.addEventListener(\"click\", run);\r\n<\/script>\r\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>BMi What is BMi. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Select Gender Male Female Select an activity factor: Little or no Exercise \/ desk job Light exercise \/ sports 1 \u2013 3 days\/ week Moderate Exercise, sports 3 \u2013 5 days \/ week Heavy Exercise \/ sports 6 \u2013 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-3357","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/atcfizjoterapia.pl\/index.php\/wp-json\/wp\/v2\/pages\/3357","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/atcfizjoterapia.pl\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/atcfizjoterapia.pl\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/atcfizjoterapia.pl\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/atcfizjoterapia.pl\/index.php\/wp-json\/wp\/v2\/comments?post=3357"}],"version-history":[{"count":0,"href":"https:\/\/atcfizjoterapia.pl\/index.php\/wp-json\/wp\/v2\/pages\/3357\/revisions"}],"wp:attachment":[{"href":"https:\/\/atcfizjoterapia.pl\/index.php\/wp-json\/wp\/v2\/media?parent=3357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}