I’ve got html that looks something like:
<div id="1" class="lineItem" data-options="">Line1</div>
<div id="2" class="lineItem" data-options="{size: M;}">Line2</div>
<div id="3" class="lineItem" data-options="{color: black;}">Line3</div>
Can I construct some sort of selector to just get <div id="2"> and <div id="3">?
Something like:
$('.lineItem[data-options='not blank']')
Is this possible, or do I have to go through each of the DIVs manually to check that the data-options attribute isn’t blank?
You can use the
:notselectorFIDDLE