[jQuery] Re: Select the parent of current element!

2007-12-27 Thread Nguyễn Quốc Vinh
Thank you very much, Karl(It's seems that you are in german) It's work well and i known much about wonderful parent method! Again, thank you! On 17/12/2007, Wizzud <[EMAIL PROTECTED]> wrote: > > > $("input.saveButton").click(function () { > alert( $(this).parent().find('input:first').val

[jQuery] Re: Select the parent of current element!

2007-12-16 Thread Wizzud
$("input.saveButton").click(function () { alert( $(this).parent().find('input:first').val() ); }); or $("input.saveButton").click(function () { alert( $(this).siblings('input').eq(0).val() ); }); On Dec 16, 9:33 am, Karl Delandsheere <[EMAIL PROTECTED]> wrote: > Hi!

[jQuery] Re: Select the parent of current element!

2007-12-16 Thread Karl Delandsheere
Hi! Did you try this: $(document).ready(function () { $("input.saveButton").click(function () { var parent = this.parentNode; alert(parent); }); }); And if you want to get the jQuery object, $(this.parentNode). Anyway, you have the "parents()" method. Hope that I help