i need to write a javascript code that make the checkbox if checked view a textbox and if not checked the text box is invisable automatically without having a button to click on it to do that
<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
<script type="text/javascript">
$('#Checkbox').click(function(){
var checked_status = this.checked;
if(checked_status == true) {
$('#txt').show();
}
else { $('#txt').hide();
}
}); </script>
</asp:Content>
<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
<input type="checkbox" id="checkbox"/>
<input type="text" id="txt" style="display:none"/>
</asp:Content>