[英]TYPO3: Can i use a Mask field into javascript code
Can I use a TYPO3 Mask checkbox field into my javascript code, in fact I have a slider item and I want to add a checkbox for autoplay (on/off) in the backend of TYPO3, then the editor can use it. Can I use a TYPO3 Mask checkbox field into my javascript code, in fact I have a slider item and I want to add a checkbox for autoplay (on/off) in the backend of TYPO3, then the editor can use it.
swipe: true,
swipeToSlide: true,
adaptiveHeight: true,
touchThreshold: 10,
autoplay: true, <-----------
autoplaySpeed: 3000,
});
In order to pass content element data to JavaScript, I suggest the data-pattern:为了将内容元素数据传递给 JavaScript,我建议使用数据模式:
Fluid:体液:
<... data-slider-autoplay="{data.tx_mask_autoplay}">
JavaScript: JavaScript:
document.querySelector['[data-slider-autoplay]'].dataset.sliderAutoplay
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.