【问题标题】:Hiding DIVs using Jquery is not working in Safari (iOS)使用 Jquery 隐藏 DIV 在 Safari (iOS) 中不起作用
【发布时间】:2017-07-04 10:55:28
【问题描述】:

我编写了一个相当基本的脚本,它在准备好文档时隐藏 HTML 表单上的各种字段。这在我的台式机和 Kindle 上运行良好,但在使用 Safari 的 iPad 上试用时,没有任何元素被隐藏。

$(document).ready(function()
{
    //Hide the editable field DIVs
    $("#form_location_edit").hide();
    $("#form_bin_no_edit").hide();
    $("#form_area_edit").hide();
    $("#form_quantity_edit").hide();
    $("#form_denomination_edit").hide();
    $("#form_comments_edit").hide();
    $("#form_responsible_edit").hide();
}

我做错了什么?

【问题讨论】:

    标签: jquery html ios safari


    【解决方案1】:

    某些版本的 Safari 不支持hide() 功能。您可以使用 CSS + addClass() 函数代替它。

    见:Hide and show function not working in Safari

    【讨论】:

      猜你喜欢
      • 2020-06-16
      • 2016-09-15
      • 1970-01-01
      • 1970-01-01
      • 2016-08-18
      • 1970-01-01
      • 2011-07-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多