Reputation: 11875
var dialogDiv = $('<div style="display:none;"></div>').appendTo('body');
$.validator.unobtrusive.parse($('form', dialogDiv));
"$('form', dialogDiv)", I know this should be jquery selector . but if this is multiple selector. should we move the dialogDiv inside the quote? "$('form, dialogDiv')"
Upvotes: 0
Views: 51
Reputation: 26699
The second parameter of jQuery's selector is context
$('form', dialogDiv)
is the same as $(dialogDiv).find('form')
;
Upvotes: 2
Reputation: 190907
Its looking for a form
inside divDialog
which appears to be empty.
Upvotes: 2