I can't seem to find the css3 wildcard for "any value not equal to zero or empty."
I have a bunch of divs, some of them have an attribute data-group-id, but not all. I want to find all divs that have this attribute, data-group-id` and not empty.
So, for example, I have these divs:
<div class="col-md-2 custom_boxshadow" data-role="mergeSelector" data-required="1"></div>
<div class="col-md-2 custom_boxshadow" data-role="mergeSelector" data-required="1"></div>
<div class="col-md-2 custom_boxshadow" data-role="mergeSelector" data-required></div>
<div class="col-md-2 custom_boxshadow" data-role="mergeSelector" data-required data-group-id="55"></div>
<div class="col-md-2 custom_boxshadow" data-role="mergeSelector" data-required data-group-id="55"></div>
<div class="col-md-2 custom_boxshadow" data-role="mergeSelector" data-required data-group-id="15"></div>
As you can see, the last 3 divs have an attribute data-group-id.
I want to have a selector that finds these three elements. Essentially, I'm trying to make this logic
$parent.find('div[data-role="mergeSelector"][data-group-id="*"]')
where * is a wild card saying "it matters, but it doesn't matter what value it matters."
Is there a selector that exists for this? I can not find anything on the Internet.
!
, :
$parent.find('div[data-role="mergeSelector"][data-group-id]:not([data-group-id=ββ""])')