I have dynamic page under {foreach} tag something like this.
<div id="c1">
{foreach}
<input type="checkbox" name="checkbox" id="{$num}" checked/>
{/foreach}
</div>
which in return prints something like this.
<div id="c1">
<input type="checkbox" name="checkbox1" id="1" checked/>
<input type="checkbox" name="checkbox2" id="2" checked/>
<input type="checkbox" name="checkbox3" id="3" checked/>
</div>
What I want is to hide <div id="c1"> & show only one checkbox outside
<div id="c1">
controlling all checkboxes which are inside <div id="c1">
How can I achieve this ?
Thanks.
- Mandar
You mean something like this?
Try it out: http://jsfiddle.net/3Hjam/ (click the checkbox in the right panel)
HTML
jQuery