开发者

please help me understand this jQuery selector

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 multipl开发者_开发技巧e selector. should we move the dialogDiv inside the quote? "$('form, dialogDiv')"


The second parameter of jQuery's selector is context $('form', dialogDiv) is the same as $(dialogDiv).find('form');


Its looking for a form inside divDialog which appears to be empty.


It is the equivalent of $(dialogFiv).find('form').

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜