Product description
Mini Solar Ground Lights
Merchant Video

P.now("premium-aplus-13-carousel-4").execute(function(init) { if (init) { return; } P.register("premium-aplus-13-carousel-4", function(){ return function() { P.when("A", "jQuery", "a-carousel-framework", "ready").execute(function (A, $, framework) { const ENTER_KEY_CODE = 13; const ESCAPE_KEY_CODE = 27; var moduleId = "4"; var carouselName = "premium-aplus-13-carousel-4"; var paginationAction = "aplus-pagination-dot-action-" + moduleId + "-" + carouselName; var paginationGroup = "#aplus-pagination-group-" + moduleId + "-" + carouselName;
/* If the carousel goes to a new page */ A.on("a:carousel:"+carouselName+":change:pageNumber", function (data) { A.$(paginationGroup+" .carousel-slider-circle").removeClass("aplus-carousel-active").attr('aria-selected', 'false').attr('tabindex', -1) .eq(data.newValue - 1).addClass("aplus-carousel-active").attr('aria-selected', 'true').attr('tabindex', 0); });
function syncPaginationDotsWithCarouselPages(numPages) { const children = document.querySelector(paginationGroup).children;
for(let i = 0; i < children.length; i++) { if (i >= numPages) { // If number of dots > num of pages, we should hide other dots children[i].classList.add('aplus-pagination-dot--display-none'); } else if(children[i].classList.contains('aplus-pagination-dot--display-none')){ // Reset display of dots if it was hidden before children[i].classList.remove('aplus-pagination-dot--display-none'); } } }
framework.onInit(carouselName, function (carousel) { var totalPages = carousel.getAttr('totalPages'); syncPaginationDotsWithCarouselPages(totalPages); /* Resize event handler to re-calculate the pagination dots count based on orientation */ window.addEventListener('resize', function() { carousel.resize(); totalPages = carousel.getAttr('totalPages'); syncPaginationDotsWithCarouselPages(totalPages); });
A.declarative(paginationAction, 'click keydown', function(event){ var isClick = event.type === 'click'; var isKeydown = event.type === 'keydown'; var isEnter = isKeydown && event.$event.keyCode === ENTER_KEY_CODE; var isEsc = isKeydown && event.$event.keyCode === ESCAPE_KEY_CODE; if (isClick || isEnter) { var data = event.data; carousel.gotoPage(data.page); } else if (isEsc) { // force remove focus event.$target.blur() } }); }); }); } }); });

Reviews
There are no reviews yet.