This code I wrote will accomplish that. It will create jQuery [parent, element] and take first one (parent), but if it's empty, then it will consist of [element] (and take first one - element).
This code I wrote will accomplish that. It will create jQuery [parent, element] and take first one (parent), but if it's empty, then it will consist of [element] (and take first one - element).

Qbix/Platform,AndreyTepaykin/Platform,EGreg/Platform,Qbix/Platform,EGreg/Platform,AndreyTepaykin/Platform,Qbix/Platform,EGreg/Platform,AndreyTepaykin/Platform,Qbix/Platform,AndreyTepaykin/Platform,EGreg/Platform