Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个现有的 rails 表单,其中包含许多可以使用 in_place_editor 就地编辑的部分。现在我需要在离开页面之前检测是否有任何就地表单可见,即用户正在编辑一个部分。这样做的通常“导轨方式”是什么?
事实证明,这在白天和一些额外的咖啡中相当容易:
jQuery(".form:visible").length > 0
成功了。所有有问题的表格都有类“.form”