COVID 19 Updates .::. Home


COVID 19 Updates .::. Home = loops) { // remove the interval $self.removeData(‘countTo’); clearInterval(data.interval); value = settings.to; if (typeof (settings.onComplete) == ‘function’) { settings.onComplete.call(self, value); } } } function render(value) { var formattedValue = settings.formatter.call(self, value, settings); $self.html(formattedValue); } }); }; $.fn.countTo.defaults = { from: 0, // the number the element should start at to: 0, // the number the element should end at speed: 1000, // how long it should take to count between the target numbers refreshInterval: 100, // how often the element should be updated decimals: 0, // the number of decimal places to show formatter: formatter, // handler for formatting the value before rendering onUpdate: null, // callback method for every time the element is updated onComplete: null // callback method for when the element finishes updating }; function formatter(value, settings) { return value.toFixed(settings.decimals); } }(jQuery)); function loadBreakingNews() { $.ajax({ cache: false, async: true, type: “POST”, dataType: “json”, url: $(“#breaking-news-list”).data(‘url’), data: “page=1&pageSize=5”, success: function (ajaxResult) { $(“#breaking-news-list”).html(ajaxResult.Data); } }); } jQuery(function ($) { // custom formatting example $(‘.count-number’).data(‘countToOptions’, { formatter: function (value, options) { return value.toFixed(options.decimals).replace(/B(?=(?:d{3})+(?!d))/g, ‘,’); } }); // start all the timers $(‘.timer’).each(count); function count(options) { var $this = $(this); options = $.extend({}, options || {}, $this.data(‘countToOptions’) || {}); $this.countTo(options); } loadBreakingNews(); }); $.get(“/En/Home/Chart”, function (data) { Morris.Line({ element: ‘graph’, data: data, xkey: ‘Date’, colors: [‘#0C4787’, ‘#DC3545’, ‘#FFC107’, ‘#28A745’], lineColors: [‘#0C4787’, ‘#DC3545’, ‘#FFC107’, ‘#28A745’], trendLineColors:[‘#0C4787’, ‘#DC3545’, ‘#FFC107’, ‘#28A745’], ykeys: [‘CaseCounter’, ‘DeadCounter’, ‘CriticalCounter’, ‘RecoveredCounter’], labels: [‘Case’, ‘Deceased’, ‘Critical’, ‘Recovered’], xLabelAngle: 0, xLabelFormat: function (d) { return (“0” + d.getDate()).slice(-2) + ‘-‘ + (“0” + (d.getMonth() + 1)).slice(-2);// + ‘-‘ + d.getFullYear(); } }); }); $.get(“/En/Home/ChartActive”, function (data) { Morris.Line({ element: ‘active-cases’, data: data, xkey: ‘Date’, colors: [‘#0C4787’], lineColors: [‘#0C4787’], trendLineColors:[‘#0C4787’], ykeys: [‘CaseCounter’], labels: [‘Case’], xLabelAngle: 0, xLabelFormat: function (d) { return (“0” + d.getDate()).slice(-2) + ‘-‘ + (“0” + (d.getMonth() + 1)).slice(-2);// + ‘-‘ + d.getFullYear(); } }); }); $(‘#newsTicker’).breakingNews({ position : ‘fixed-bottom’, borderWidth: 3, height: 50, themeColor: ‘#ce2525’, }); $.ajax({ cache: false, async: true, type: “GET”, dataType: “text”, url: “/Files/” + $(“#hdnLang”).val() + “.txt”, success: function (ajaxResult) { $(ajaxResult).insertBefore(“#counters-div”); } }); ]]>

Source

Leave a Reply

Your email address will not be published. Required fields are marked *