- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一段代码适用于除 Samsung Internet 以外的所有内容。 Chrome 移动版和 chrome 开发工具移动模拟器一样运行良好。我每次尝试都会清除浏览数据。
单击服务类别按钮(下图第一张)时,它应该会打开相关联的引导折叠卡(下图第二张)。
第一张图片:
第二张图片:
这是 github 仓库 https://github.com/dByler1/windle-chimney https://dbyler1.github.io/windle-chimney/
.on('click', function(){} 部分有效。每个变量都干净地记录下来。它不会进入逻辑 block 。
$(".servicesBTN").on("click", function (e) {
//get the data target value of the button that was clicked which is the same as the accordian content IDs
let dataTarget = this.getAttribute("data-target")
let servicesDisplayValue = getComputedStyle(document.getElementById('servicesDescriptions')).display
//all three console.logs fire and log expected results
console.log('data target ' + dataTarget)
console.log('services display value ' + servicesDisplayValue)
console.log('test hasClass' + $(dataTarget).hasClass('show'))
//if the clicked button's associated card does have the show class, set the data toggle to blank so it won't change
//none of the logs in the if blocks fire
if ($(dataTarget).hasClass("show") && servicesDisplayValue === 'block') {
this.setAttribute("data-toggle", "")
console.log('first block - already open - display block')
} else if ($(dataTarget).hasClass("show") && servicesDisplayValue === 'none') {
this.setAttribute("data-toggle", "")
mobileShowServiceInfo($(this))
console.log('second block - already open - display none - mobile assumption')
}
else {
//give the clicked button a data-toggle of collapse so it will open
this.setAttribute("data-toggle", "collapse")
mobileShowServiceInfo($(this))
changeAllAngleIcons($(this))
console.log('third block - ')
}
})
最佳答案
这里假设您遇到的三星互联网 (SI) 问题的来源。
首先,问题出在函数调用中:mobileShowServiceInfo($(this))
。不在 if/else block 中。
在那个函数中,那一行是问题所在:( From OP's GitHub repo )
document.getElementById('backBTN').classList.replace('d-none', 'd-md-none')
所以我猜 SI 真的不喜欢 .replace()
的未分配结果。
这应该可行:
let tempClassList = document.getElementById('backBTN').classList;
document.getElementById('backBTN').classList = tempClassList.replace('d-none', 'd-md-none');
但这虽然更短更清晰,但解决了问题:
$('#backBTN').removeClass('d-none').addClass('d-md-none');
所以我猜测不是简单地丢弃.replace()
结果因为没有赋值,SI只是破坏了代码。 ..
;
。更多信息请阅读
this SO answer .
;)
关于javascript - 适用于除三星互联网外的所有浏览器/设备的逻辑,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53459724/
最近两年,互联网+的概念可谓十分火爆。所谓“互联网+”,其实质就是把互联网大平台和各行各业进行有机结合,建立一个新的商业生态,对于传统企业来说,互联网+的第一步就是有一个企业网站,将自己推广出去
我的大学分两步运行他们的 wifi 身份验证。首先您连接到 wifi 网络,然后当您打开网络浏览器时,您必须输入一些关于您自己的附加信息才能访问互联网。 1)大学系统有一些方法可以检测设备之前是否已经
有没有办法监控每个应用程序使用了多少数据(互联网)? 如果我无法监控应用程序,是否有办法获取所有互联网请求信息?(获取传递的数据、url 等) (我想在为 iPhone 开发的应用程序中使用此信息)
我想从我的 MTI RFID ME Gen2 Internet 中读出一些标签: http://www.mti.com.tw/rfidme/ 这是一个 USB Dongle,现在我想用 c# 在 VS
我正在开发一个应用程序。其中,我想在一段时间内禁止使用互联网,尤其是在他有作业的情况下。如何禁用互联网? 最佳答案 要以编程方式启用/禁用数据连接,请检查此 post 要禁用/启用 wi-fi,请参阅
在我的应用程序中,我只需要知道设备是否连接到 wifi 网络。我认为此功能适用于模拟器但不适用于真实设备。 public static boolean wifiInternet(Context c)
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 关闭 12 年前。 Improve th
设想一种情况,我的 PC 有两个网卡,一个连接到互联网,另一个连接到本地网络,我如何用 C# 检测连接到互联网的 IP? 最佳答案 试试这个: static IPAddress getInternet
我的 firebase 应用程序在我的 android 设备上运行完美,无需添加 permission.INTERNET 标志。我直接从 gradle 安装了 Firebase。我知道通过 andro
最近我开始考虑一种解决方案,通过 Internet 向我的订阅客户发布消息。我们的系统是用 C# 开发的。 我们尝试使用 Redis,它在速度和准确性方面非常好,但在安全性方面非常糟糕,每个人都可以订
国内公司普遍不注重基础设施建设,这也是可以理解的。吃饭都吃不饱,就别提什么荤素搭配,两菜一汤了。但也不能全说是这样,还是有很多公司投入大量的人力物力去做好公司的基建,比如很多阿里和美团的小伙伴对公司
我有几个 Azure Functions(高级计划),它们可以执行一些操作并将结果加载到存储 blob。与存储帐户的连接受到 v-net 的限制,因此无法公开访问存储帐户,但是,我检查并发现我的 (H
我正在我的家庭有线网络上解析 ICMPv6 数据报,但在特定的 RFC 中找不到对位排序约定的明确提及。 多字节字段是网络顺序,但是一个字节内的位呢? 机器是字节可寻址的,但网络硬件将位序列化。在图表
我如何在笔记本电脑上配置以太网或 wifi,我遵循了这个 tutorial我的以太网正常启动,但我仍然无法从 ping 8.8.8.8 dns 收到任何数据包,我的笔记本电脑上有以太网和 wifi .
我在 Genymotion 模拟器上运行的应用程序需要互联网。网上好像不能用Genymotion模拟器。我试图通过打开浏览器来确认这一点,这就是我得到的: 我在笔记本电脑上运行 Windows 7 并
我目前正在学习 docker 和 kubernetes。我遇到的问题之一是将我的 nginx pod 暴露在公共(public)互联网上。我想从我的网络浏览器访问我的 serverIP 并查看 ngi
是否可以为 ImageSpan 指定 Internet url 并使用 TextView 显示它?我已经尝试了很多版本 String mockContent = ""; myTextView.setT
例子。 我在 Google 主页上做了一些 CSS 更改。我想保存 CSS(某处)并在每次加载页面时都具有相同的外观。 欢迎使用任何浏览器插件或任何其他方法。 最佳答案 如果使用谷歌浏览器,有一个名为
我正在构建一个旨在加载到 Wii Internet Channel(本质上是 Opera 9.3)的 Web 应用程序。 它支持 SVG,但它们似乎无法缩放。无论宽度和高度设置为多少,图形始终以其“最
我安装了 python 2.7.5,它工作正常。 然后我安装scrapy(我认为,它在内部使用了twisted)。我的爬虫蜘蛛也工作正常。 我安装了扭曲: sudo apt-get install p
我是一名优秀的程序员,十分优秀!