I'm trying to understand the flexigrid at FlexiGrid
At line # 1161 & 1163 I dint understand the jQuery selectors: $('div',g.pDiv).html(html); & $('.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:
$('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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.