jquery/jquery-mobile — pull request #2778 by ronchalant (2011-10-20 20:43:30+00:00)
Title: Fix for potential issues with getInheritedTheme

per: https://github.com/jquery/jquery-mobile/issues/2770

I think the safest approach is to turn this into a recursive function. Normally I'd reuse closest(), but unless we put in a jQuery expr to support our regex (which seems a bit much for this) this seems the best approach.

It also allows you to get an inherited theme right from a jQuery object, i.e. $("#field-one").inheritedTheme()