{"id":309,"date":"2016-12-20T08:21:35","date_gmt":"2016-12-20T08:21:35","guid":{"rendered":"http:\/\/localhost\/borrow\/?page_id=309"},"modified":"2016-12-20T08:21:35","modified_gmt":"2016-12-20T08:21:35","slug":"loan-calculator","status":"publish","type":"page","link":"https:\/\/sowcarloan.com\/index.php\/loan-calculator\/","title":{"rendered":"Loan Calculator"},"content":{"rendered":"<section class=\"wpb-content-wrapper\"><p>[vc_row][vc_column box=&#8221;true&#8221; bgcolor=&#8221;#ffffff&#8221;]  <div class=\"row\">\n    <div class=\"col-md-6\">\n        <div class=\"bg-light pinside40 outline\">\n            <span>Loan Amount is <\/span>\n            <strong><span class=\"pull-right\" id=\"la_value\">30000<\/span><\/strong>\n            <input type=\"text\" data-slider=\"true\" value=\"30000\" data-slider-range=\"100000,5000000\" data-slider-step=\"10000\" data-slider-snap=\"true\" id=\"la\">\n            <hr>\n            <span>No. of Month is <strong><span class=\"pull-right\"  id=\"nm_value\">30<\/span> <\/strong>\n            <\/span>\n            <input type=\"text\" data-slider=\"true\" value=\"30\" data-slider-range=\"120,360\" data-slider-step=\"1\" data-slider-snap=\"true\" id=\"nm\">\n            <hr>\n            <span>Rate of Interest `{`ROI`}` is <strong><span class=\"pull-right\"  id=\"roi_value\">10<\/span>\n            <\/strong>\n            <\/span>\n            <input type=\"text\" data-slider=\"true\" value=\"10\" data-slider-range=\"8,16\" data-slider-step=\".05\" data-slider-snap=\"true\" id=\"roi\">\n        <\/div>\n    <\/div>\n    <div class=\"col-md-6\">\n        <div class=\"row\">\n            <div class=\"col-md-12 \">\n                <div class=\"bg-light pinside30 outline\">\n                    Monthly EMI                    <h2 id='emi' class=\"pull-right\"><\/h2>\n                <\/div>\n            <\/div>\n            <div class=\"col-md-12\">\n                <div class=\"bg-light pinside30 outline\">\n                    Total Interest                    <h2 id='tbl_int' class=\"pull-right\"><\/h2>\n                <\/div>\n            <\/div>\n            <div class=\"col-md-12\">\n                <div class=\"bg-light pinside30 outline\"> \n                     Payable Amount                    <h2 id='tbl_full' class=\"pull-right\"><\/h2><\/div>\n            <\/div>\n            <div class=\"col-md-12\">\n                <div class=\"bg-light pinside30 outline\">\n                     Interest Percentage                    <h2 id='tbl_int_pge' class=\"pull-right\"><\/h2>\n                <\/div>\n            <\/div>\n        <\/div>\n    <\/div>\n    <div class=\"col-md-12\">\n        <a class=\"btn btn-default\" href=\"http:\/\/demo.oceanthemes.net\/borrow\/contact-us\/\" title=\"Apply Now\" target=\"_self\">Apply Now<\/a>    <\/div>\n<\/div>\n<script type=\"text\/javascript\">\n   (function($) {\n        $(document).ready(function(){\n            $(\"#la\").bind(\n                \"slider:changed\", function (event, data) {              \n                    $(\"#la_value\").html(data.value.toFixed(0)); \n                    calculateEMI();\n                }\n            );\n\n            $(\"#nm\").bind(\n                \"slider:changed\", function (event, data) {              \n                    $(\"#nm_value\").html(data.value.toFixed(0)); \n                    calculateEMI();\n                }\n            );\n            \n            $(\"#roi\").bind(\n                \"slider:changed\", function (event, data) {              \n                    $(\"#roi_value\").html(data.value.toFixed(2)); \n                    calculateEMI();\n                }\n            );\n            \n            function calculateEMI(){\n                var loanAmount = $(\"#la_value\").html();\n                var numberOfMonths = $(\"#nm_value\").html();\n                var rateOfInterest = $(\"#roi_value\").html();\n                var monthlyInterestRatio = (rateOfInterest\/100)\/12;\n                \n                var top = Math.pow((1+monthlyInterestRatio),numberOfMonths);\n                var bottom = top -1;\n                var sp = top \/ bottom;\n                var emi = ((loanAmount * monthlyInterestRatio) * sp);\n                var full = numberOfMonths * emi;\n                var interest = full - loanAmount;\n                var int_pge =  (interest \/ full) * 100;\n                $(\"#tbl_int_pge\").html(int_pge.toFixed(2)+\" %\");\n                \/\/$(\"#tbl_loan_pge\").html((100-int_pge.toFixed(2))+\" %\");               \n                \n                var emi_str = \"\" + emi.toFixed(2).replace(\".\", \".\").replace(\/\\B(?=(\\d{3})+(?!\\d))\/g, \",\");\n                var loanAmount_str = loanAmount.toString().replace(\/,\/g, \"\").replace(\/\\B(?=(\\d{3})+(?!\\d))\/g, \",\");\n                var full_str = \"\" + full.toFixed(2).replace(\".\", \".\").replace(\/\\B(?=(\\d{3})+(?!\\d))\/g, \",\");\n                var int_str = \"\" + interest.toFixed(2).replace(\".\", \".\").replace(\/\\B(?=(\\d{3})+(?!\\d))\/g, \",\");\n                \n                $(\"#emi\").html(emi_str);\n                $(\"#tbl_emi\").html(emi_str);\n                $(\"#tbl_la\").html(loanAmount_str);\n                $(\"#tbl_nm\").html(numberOfMonths);\n                $(\"#tbl_roi\").html(rateOfInterest);\n                $(\"#tbl_full\").html(full_str);\n                $(\"#tbl_int\").html(int_str);                 \n            }\n            calculateEMI();\n        });\n\t})(jQuery);\n<\/script>\n\n[\/vc_column][\/vc_row]<\/p>\n<\/section>","protected":false},"excerpt":{"rendered":"<p>[vc_row][vc_column box=&#8221;true&#8221; bgcolor=&#8221;#ffffff&#8221;][\/vc_column][\/vc_row]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-templates\/template-fullwidth.php","meta":[],"_links":{"self":[{"href":"https:\/\/sowcarloan.com\/index.php\/wp-json\/wp\/v2\/pages\/309"}],"collection":[{"href":"https:\/\/sowcarloan.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sowcarloan.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sowcarloan.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sowcarloan.com\/index.php\/wp-json\/wp\/v2\/comments?post=309"}],"version-history":[{"count":0,"href":"https:\/\/sowcarloan.com\/index.php\/wp-json\/wp\/v2\/pages\/309\/revisions"}],"wp:attachment":[{"href":"https:\/\/sowcarloan.com\/index.php\/wp-json\/wp\/v2\/media?parent=309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}