Loading…
`;if(firstActiveTab.innerHTML==’लाइव’||firstActiveTab.innerHTML==’LIVE’){setTimeout(function(){$(‘#live__fixtures .carousel__container’).html(loaderElement)},100)}else if(firstActiveTab.innerHTML==’आगामी’||firstActiveTab.innerHTML==’UPCOMING’){setTimeout(function(){$(‘#upcoming__fixtures .carousel__container’).html(loaderElement)},100)}else{setTimeout(function(){$(‘#completed__fixtures .carousel__container’).html(loaderElement)},100)}$.ajax({url:’https://www.indiatoday.in/live-score/series_team_venue_filter’,method:’POST’,type:’POST’,data:{series_id:15488,teams:selectedTeams,venues:selectedVenues,activeTab:firstActiveTab.innerHTML},success:function(response){console.log(“AjaxCall”,response);var resObject=JSON.parse(response);var resMatchesArray=resObject;var htmlData=”;var noMatchFound=’No Match Found’;if(Array.isArray(resMatchesArray)&&resMatchesArray.length>0){resMatchesArray.forEach(function(match){let scoreCardText=”Full Scorecard”;let baseURL=”https://www.indiatoday.in/live-score/”;let matchdateISTTop=”+formatDate(match.matchdate_ist)+’
‘;let scordCardLink=”+scoreCardText+”;if(firstActiveTab.innerHTML==’आगामी’||firstActiveTab.innerHTML==’UPCOMING’){scordCardLink=match.venue}let inning1Score=”;if(match.inn_score_2.length>0){const scoreArray=match.inn_score_2.split(‘ ‘);inning1Score=`
${scoreArray[1]}${scoreArray[2]}
`;if(match.inn_score_4){const scoreArray2=match.inn_score_4.split(‘ ‘);inning1Score=`
${scoreArray2[0]}
${scoreArray2[1]}${scoreArray2[2]}
`}}else{if((firstActiveTab.innerHTML!=’आगामी’)&&(firstActiveTab.innerHTML!=’UPCOMING’)){inning1Score=’
To
Play
‘;matchdateISTTop=”}}let inning2Score=”;if(match.inn_score_1.length>0){const scoreArray=match.inn_score_1.split(‘ ‘);inning2Score=`
${scoreArray[0]}
${scoreArray[1]}${scoreArray[2]}
`;if(match.inn_score_3){const scoreArray2=match.inn_score_3.split(‘ ‘);inning2Score=`
${scoreArray2[0]}
${scoreArray2[1]}${scoreArray2[2]}
`}}else{if(firstActiveTab.innerHTML!=’आगामी’&&firstActiveTab.innerHTML!=’UPCOMING’){inning2Score=’
To
Play
‘;matchdateISTTop=”}}htmlData+=`
${matchdateISTTop}`})}else{htmlData=“}if(firstActiveTab.innerHTML==’लाइव’||firstActiveTab.innerHTML==’LIVE’){setTimeout(function(){$(‘#live__fixtures .carousel__container’).html(htmlData)},1000)}else if(firstActiveTab.innerHTML==’आगामी’||firstActiveTab.innerHTML==’UPCOMING’){setTimeout(function(){$(‘#upcoming__fixtures .carousel__container’).html(htmlData)},1000)}else{setTimeout(function(){$(‘#completed__fixtures .carousel__container’).html(htmlData)},1000)}},error:function(xhr,status,error){setTimeout(function(){$(‘#completed__fixtures .carousel__container’).html(‘
Server Error!!!
‘)},2000);console.error(error)}})}$(‘#checkbox-container’).on(‘change’,’input[type=”checkbox”]’,function(){var checkedCountTeam=$(‘input[name=”teams[]”]:checked’).length;var checkedCountVenues=$(‘input[name=”venues[]”]:checked’).length;if(checkedCountTeam){$(‘#selectTeamCount’).html(”+checkedCountTeam+”)}else{$(‘#selectTeamCount’).html(”)}if(checkedCountVenues){$(‘#selectVenuesCount’).html(”+checkedCountVenues+”)}else{$(‘#selectVenuesCount’).html(”)}makeAjaxCall()})})});
