There is no problem with the following code in Google browser and an error is reported in Firefox:
const doms = document.getElementsByClassName("cesium-baseLayerPicker-dropDown")
for (let i in doms) {
const dom = doms[i]
if (dom) {
$(dom).addClass("scroll-1")
}
}
The following modifications are required
$(".cesium-baseLayerPicker-dropDown").addClass("scroll-1")
Read More:
- IDEA reports an error. Error XXX reports an error. The class cannot be found
- Firefox: How to Solve Syntax error: invalid regexp group
- The Ajax return value reports an error, and the spring boot development Ajax return value reports an error
- How to Solve Jquery 1.9 $.browser Error
- [Solved] Laravel reports an error when executing composer update
- Maven compiles Scala and reports an error stackoverflowerror
- [kubernetes] the pod instance of calico node always reports an error and restarts
- The index.nvue page of uniapp reports an error about CSS
- Android studio reports an error when running the main() method
- IDEA reports an error Could not reserve enough space for xxxxKB object heap processing
- Vue Import Baidu map error: BMap is not defined, eslint BMap reports an error
- mybatis-plus calls its own selectById method and reports an error: org.apache.ibatis.binding.BindingException:
- Git under Windows reports an error: warning: LF will be replaced by CRLF in ××××.××
- The pip installation package under Windows reports an error: Microsoft Visual C++ 9.0 is required Unable to find vcvarsall.bat
- [Solved] Unity3d reports an error using the opencv plug-in: unsafe code may only appear if compiling with/unsafe.
- [Solved] QT error: the packaged exe of Enigma virtual box reports an error cannot load library qt5core.dll
- How to Solve jQuery error: Uncaught ReferenceError: $ is not defined
- Scanf_S always reports errors [How to Solve]
- Log4j2 reports ERROR StatusLogger Unrecognized format specifier
- [Solved] GDAL+OPENCV often reports errors when processing remote sensing impacts