复杂的jQuery选择器

ncl*_*cla 0 jquery selector

我很难找到适合我的问题的正确的jQuery选择器.

是)我有的:

1)11个div,具有类"theCycle",其中10个被隐藏,一个显示2)当前显示的div元素中有输入3)某些输入具有"必需"类

我需要的:

需要选择类"theCycle",然后输入"required"类,然后检查它们是否已填充.

到目前为止,我所尝试的失败或仍然说我的输入没有填写.

gen*_*sis 5

  $(".theCycle:visible input.required").each(function(){
    if ($(this).val() != ""){
       //it's not empty
    } 
  });
Run Code Online (Sandbox Code Playgroud)