object-variable in selector syntax?
I want to select all children of an element.
so I want to use:
-
$("#main > *").css("border", "3px double red");
as suggested on:
http://docs.jquery.com/Selectors/child#parentchild
however, I'm within a loop and have defined the parent object as such:
-
tr_element = $(td_element).parent();
now I want to loop through the td's in the tr. So I tried:
-
$(tr_element+" > td").each(function (i) {
}
but that does not seem to work.
how to use an object in a selector when it is a variable?