").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); }, 0000); function myStopFunction() {clearInterval(interval_call);} } $(document).on("click", ".callout-container .closebtn", function(){ myStopFunction(); $(".callout0").css("display","none"); }); });