This is a migrated thread and some comments may be shown as answers.

<td> tag none and block

4 Answers 45 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
mohamed
Top achievements
Rank 1
mohamed asked on 11 Oct 2012, 05:39 AM
<td> Tag Display none and display block on Javascript

Thanks Advance,
Mohamed.

4 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 11 Oct 2012, 06:53 AM
Hi Mohamed,

Try the following jquery to change the Display Style of any element.

JS:
<script type="text/javascript">
 function OnClientClicked()
  {
    $("td").css("display", "none");
  }
</script>

Thanks,
Princy.
0
Jeff
Top achievements
Rank 1
answered on 11 Oct 2012, 06:55 AM
Thanks for your reply
<td id="td_ADTreeview" align="left" style="width: 20%; vertical-align: top; border: 1px solid #181818;display:none"
                class="divScroll-1">
var TreeViewAct = document.getElementById('td_ADTreeview');
                    TreeViewAct.style.display = 'block';
but it's not work

Thanks Advance,
Mohamed.
0
mohamed
Top achievements
Rank 1
answered on 11 Oct 2012, 06:58 AM
Thanks for your reply princy,

<td id="td_ADTreeview" align="left" style="width: 20%; vertical-align: top; border: 1px solid #181818;display:none"
                class="divScroll-1">

var TreeViewAct = document.getElementById('td_ADTreeview');
                    TreeViewAct.style.display = 'block';

i have do like that not shown any thing

Thanks Advance,
Mohamed.
0
mohamed
Top achievements
Rank 1
answered on 12 Oct 2012, 05:40 AM
Problem Resolved.

no need to give display :none in td tag

var TreeViewActDir = document.getElementById('td_ADTreeview');
if(i==1)
TreeViewActDir.style.display = 'none';
else
TreeViewActDir.style.display = 'block';

this is the way hide and show the td tag


Regards,
Mohamed.
Tags
General Discussions
Asked by
mohamed
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Jeff
Top achievements
Rank 1
mohamed
Top achievements
Rank 1
Share this question
or