Show/Hide control on checkbox checked in jquery

<script type=”text/javascript” language=”javascript”>

$(document).ready(function(){
$(‘#trDateFilter’).hide();
$(‘#<%= cbDateFilter.ClientID %>’).click(function(){
if($(this).attr(‘checked’))
$(‘#trDateFilter’).show();
else
$(‘#trDateFilter’).hide();
});
});

</script>

<table>

<tr>

<asp:CheckBox ID=”cbDateFilter” runat=”server” Text=” Allow Date Filter” TextAlign=”Right” />

</tr>

<tr id=”trDateFilter”>

<td>Hello World..!!!</td>

</tr>

</table>

For more information please mail me nipulwordpress@live.in

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s