[EMAIL PROTECTED] wrote:
I am trying to find a particular parentElement without knowing the ID.
If not I need to find a different element. SO:
var parentXpath = "[EMAIL PROTECTED]@id="+obj.id+"]/..
[EMAIL PROTECTED]";
if (*noobjectfound*) {
find new object
}
How can I do this?
I did the following once I needed something similiar:
$('#item, #other-item')
I knew that #item could not exist but #other-item does. So:
$('#item, #other-item').eq(0).show();
If #item exists that one gets shown, if not #other-item will. Kind of
build-in if-clause so to say.
--Klaus