I'm trying to target a particular col w/ specific data-index.
Here's the html:
- <div class="header">
- <div class="col " style="display: inline-block; min-width: 40px; width: 1px; height: 30px;" data-index="0">
- <div class="col " style="display: inline-block; min-width: 40px; height: 30px;" data-index="1">
- </div>
- <div class="tableHolder">
- <div class="table">
- <div class="row">
- <div class="cell " style="text-align: left; display: inline-block; width: 40px; height: 30px;" data-index="0" data-field="undefined" data-value=""></div>
- <div class="cell " tabindex="0" style="text-align: left; display: none; width: 73px; height: 30px;" data-index="1" data-field="field1" data-value="*****">*****</div> // MYTHIS STARTS HERE
- </div>
- </div>
- </div>
I'm starting at cell w/ data-index=1 (ie. mythis) & trying to target .col w/ same data-index:
- var ccell = 1;
- var chdr = mythis.closest('.tableHolder').prev().find('.col[data-index="+ ccell +"]');
- console.log('CurrHdr: ' , chdr); // Getting n[] (0), i.e. nothing