case 'carousel':
return $helper->jsonEncode(array(
'dots' => (bool) $this->getData('paging'),
'autoPlay' => is_numeric($this->getData('autoplay')) ? true : false,
'autoplayTimeout' => is_numeric($this->getData('autoplay')) ? (int) $this->getData('autoplay') : false,
'autoplayHoverPause' => true,
'loop' => true,
'lazyLoad' => true,
'responsive' => '{
0:{items:1,nav:true},
768:{items:2,nav:false},
992:{items:3,nav:true}
}',
'nav' => (bool) $this->getData('navigation'),
'navText' => array($this->getData('navigation_prev'), $this->getData('navigation_next'))
));
This is error:
Uncaught TypeError: Cannot use 'in' operator to search for 'length' in { 0:{items:1,nav:true}, 768:{items:2,nav:false}, 992:{items:3,nav:true} }
How do fix this? Thanks.
json_encode()
works with array, you should not pass a JSON stringChange :
to: