See what our customers are saying
"); let groupIdx = 0; let itemPerSlide = 1; items.forEach((item, idx) => { let itemp = itemTpl.map(renderTemplate(item)).join(''); row.append(itemp); if ((idx + 1) % itemPerSlide === 0 || (idx + 1) === items.length) { let wrapper = jQuery('
'); wrapper.addClass((groupIdx === 0) ? 'active' : ''); jQuery(id + ' .carousel-inner').append(wrapper.append(row)); row = jQuery('
'); let indicator = jQuery('
'); indicator.addClass((groupIdx === 0) ? 'active' : ''); jQuery(id + ' .carousel-indicators').append(indicator) groupIdx++; } }); if (items.length <= itemPerSlide) { jQuery(id + ' .carousel-controls').hide(); } else { jQuery(id + ' .carousel-controls').show(); } } const hbWhyItems = [ { "stars": "★ ★ ★ ★ ★", "quote": "“Everything I need to keep my checking and savings accounts balanced and researchable. It makes paying bills and entering data fun!”", "name": "— Allen | Starter", }, { "stars": "★ ★ ★ ★ ★", "quote": "“ I have been using for decades. Very easy to use and helps you keep track of how you spend. Definitely a good purchase, I would recommend it over other systems. \" ", "name": "— Barb | Starter", }, { "stars": "★ ★ ★ ★ ★", "quote": "“I have been using Quicken for well over 10 years. I would be lost without it..”", "name": "— Ira | Starter", }, ]; document.addEventListener("DOMContentLoaded", function (event) { const pressNewsTpl = jQuery('script[data-template="ha-why-carousel-tpl"]'); createCarousel('#crs-ha-why', pressNewsTpl, hbWhyItems); // Prevent mobile scroll from triggering resize event var width = jQuery(window).width(), height = jQuery(window).height(); // Bind the swipeleftHandler callback function to the swipe event on div.box jQuery('#crs-ha-why').on( "swipeleft", swipeleftHandler ); // Callback function references the event target and adds the 'swipeleft' class to it function swipeleftHandler( event ){ alert(';eft'); } jQuery(window).resize(function () { if (jQuery(window).width() != width || jQuery(window).height() != height) { const pressNewsTpl = jQuery('script[data-template="ha-why-carousel-tpl"]'); jQuery('#crs-ha-why .carousel-inner').empty(); jQuery('#crs-ha-why .carousel-indicators').empty(); createCarousel('#crs-ha-why', pressNewsTpl, hbWhyItems); } }); });