Hi,
I had an issue with the clone() function in that it wasn't copying
over select values. I've added this function to my page
function cloneForm(id, withEvents)
{
var clone = $('#'+id).clone(withEvents);
var selvals = [];
$('#'+id+" select").each(function()
{
selvals.push($(this).va
dave.methvin wrote:
>
>
>> ... is there a way to recursively roll out until you reach a parent
>> that matches a given id?
>
> It sounds like you want .parents(selector), which looks for the
> ancestor elements matching the selector.
>
> http://docs.jquery.com/Traversing/parents#expr
>
>
I have a click event tied to an element and I need to access a grandparent
element that is quite a few jumps away. I could count the jumps and hard
code it but is there a way to recursively roll out until you reach a parent
that matches a given id?
Or do you manually have to do it?
Cheers in ad
3 matches
Mail list logo