简体   繁体   English

jQuery flexigrid选择器

[英]jquery flexigrid selectors

I'm trying to understand the flexigrid at FlexiGrid 我正在尝试了解FlexiGrid的flexigrid

At line # 1161 & 1163 I dint understand the jQuery selectors: $('div',g.pDiv).html(html); 在第1161和1163行,我了解jQuery选择器:$('div',g.pDiv).html(html); & $('.pReload',g.pDiv).click(function(){g.populate()}); &$('。pReload',g.pDiv).click(function(){g.populate()}); But these doesn't look like the multiple selectors, Please suggest me to understand this code. 但是这些看起来不像是多个选择器,请建议我理解此代码。

                $('div',g.pDiv).html(html);

            $('.pReload',g.pDiv).click(function(){g.populate()});

Regards 问候

The second argument to $(selector, context) is the context to look inside of for that selector, so this: $(selector, context)的第二个参数是要在其中查找该选择器的上下文,因此:

$('div',g.pDiv).html(html);

Is really : 真的是:

$(g.pDiv).find('div').html(html);

...so it's looking for <div> elements inside that stored g.Div element the plugin saves a reference to. ...因此它正在插件存储的g.Div元素中查找<div>元素。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM