var telcelBannerFormasDePagoModal = (function() { function init() { var mouseWheelEvt = function(event) { document.querySelector('.telcel-formas-de-pago-banner-modal--opciones .nav').scrollLeft += event.deltaX; return false; } document.querySelector('.telcel-formas-de-pago-banner-modal--opciones .nav').addEventListener("mousewheel", mouseWheelEvt); } return { init: init, } }()); function getDataModals(){ var json = ""; console.log("entra Modal"); var url = "/bin/telcelcom/general/methodsPyments"; $.ajax({ type: 'GET', url: url, cache: true, success: function (response) { json = response; // console.log("items Luis"); // console.log(itemsResponse) }, async: false }); $.each(json, function (key, value) { $.each(value.banner, function (index, data) { var formasPago = $(".telcel-formas-de-pago-banner").attr("data-prepago"); if(formasPago === undefined){ formasPago ="ambos"; } if (data.formadepago === formasPago || formasPago === "ambos" ) { var htmlmodal =""; var idTabsModals=data.titletabItem; htmlmodal += '