views:

13

answers:

1

I have an existing rails form with many sections that can be edited in place, using in_place_editor. Now I need to detect if any of the in place forms are visible, ie, the user is editing a section, before navigating away from the page. What's the usual "rails way" of doing this?

A: 

Turns out this was fairly easy during the light of day and some extra coffee:

jQuery(".form:visible").length > 0

did the trick. All the forms in question had the class `.form'

Jeff Paquette