I have data in this format:
HTML:
<div class="data-table">
<div class="data-table-item" sign="<" val="10000" result="1"></div>
<div class="data-table-item" sign=">=" val="10000" result="2"></div>
<div class="data-table-item" sign=">=" val="25000" result="3"></div>
<div class="data-table-item" sign=">=" val="50000" result="4"></div>
</div>
JS:
var user_Value = 26000;
I am trying to generate if-else dynamically so that if the user enters 26000 it should give me Result = 3 by detecting the sign attribute accordingly.
The above structure is dynamic so I can't use static if-else conditions.
Here is the JSFiddle
Please help.