admin管理员组文章数量:1336079
I have a two level list of Categories. First levels are multiple (more than 30). Also the associated child are a lot From the WP-admin, I would like to check whenever at least one of the second level (child) checkboxes are checked. I will run the jquery function after the #post has been submitted. That part is easy, but how to check if any of the childs have been checked is impossible for me to figure out. Banging my head already for days :)
I have a two level list of Categories. First levels are multiple (more than 30). Also the associated child are a lot From the WP-admin, I would like to check whenever at least one of the second level (child) checkboxes are checked. I will run the jquery function after the #post has been submitted. That part is easy, but how to check if any of the childs have been checked is impossible for me to figure out. Banging my head already for days :)
Share Improve this question asked Jun 28, 2020 at 21:17 jamjam 1732 gold badges3 silver badges15 bronze badges1 Answer
Reset to default 0Try this selector:
if ($('div#category-all ul.children input:checked').length) {
// at least one of the child categories is selected
}
本文标签: wp adminCheck with Jquery if second level checkbox from categories are checked
版权声明:本文标题:wp admin - Check with Jquery if second level checkbox from categories are checked 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742311186a2450906.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论