//WHEN I CHECK THIS
<li><input type="checkbox" name="XX"/></li>
</ul>
</div>
</div>
<table>
/// SHOULD BE HERE
</table>
</div>
<div class="Table-wrapper">
<div class="table-menu-wrapper">
<div class="table-menu-hidden">
<ul>
<li><input type="checkbox" name="XX"/></li>
</ul>
</div>
</div>
<table>
//NOT ALSO HERE
</table>
</div>
When I check or uncheck the checkbox the approriate column should appear or dissappear. However as I have multiple Table-wrapper. When I check or uncheck a checkbox, all the related column are hidden, I would like to select just the one right after the checkbox.
I tried this
cols = $($(this).parent()).siblings("#" + val + ", [headers=" + val + "]");
But it is not working this is the original one : cols = $("#" + val + ", [headers=" + val + "]");
jmy07
Member
28 Points
32 Posts
Selector Problem
Nov 23, 2012 02:16 PM|LINK
Hi,
I have something like that :
When I check or uncheck the checkbox the approriate column should appear or dissappear. However as I have multiple Table-wrapper. When I check or uncheck a checkbox, all the related column are hidden, I would like to select just the one right after the checkbox. I tried this
cols = $($(this).parent()).siblings("#" + val + ", [headers=" + val + "]");
But it is not working this is the original one : cols = $("#" + val + ", [headers=" + val + "]");
Thank you :)
Yanping Wang...
Star
14871 Points
1529 Posts
Microsoft
Re: Selector Problem
Nov 28, 2012 02:14 AM|LINK
Hi jmy07,
the checkbox XX in div, you need locate its parent class=table-menu-wrapper and then use siblings to find the work table.
var cols=$('#XX').parents('.table-menu-wrapper').siblings('table');
Hope this helps, thanks.
Feedback to us
Develop and promote your apps in Windows Store
asteranup
All-Star
30184 Points
4906 Posts
Re: Selector Problem
Nov 28, 2012 02:26 AM|LINK
Hi,
Can you create a js fiddle and share us your code?
Anup Das Gupta
Mark as Answer if you feel so. Visit My Blog