'; $("#main-container").html(dynamicTemplate); } var match_id = $("#main-container").attr("data-match-id"); var API_URL = 'https://livescore.sportstarlive.com/api/cricket/scorecard/match/'+match_id+'/match';	if(typeof match_id != "undefined"){ ajaxCall(API_URL,displayFun); var interval_call = setInterval(function () { ajaxCall(API_URL,displayFun); }, 8000); function myStopFunction() {clearInterval(interval_call);} } $(document).on("click", ".callout-container .closebtnn", function(){ myStopFunction(); $(".callout2").css("display","none"); }); }); ×