0

I need to use the jQuery find built-in function and get the ID of the "found" form.

// workingForm is a valid obj and the jQuery selector is form[id$="frmAlert-"]
var workingForm = J('#tabs').find('form[id$="frmAlert-"]');

var idWorkingForm = J(workingForm).attr('id');
alert(idWorkingForm);
var idWorkingForm = workingForm.attr('id');
alert(idWorkingForm);

Why is the idWorkingForm always undefined?

Thanks!

4

0 回答 0