Reputation: 1471
I want some hide/show functionality with my div tag. I am using below code to do that but its not working.
.aspx
<div id="divCust" runat="server" clientidmode="Static" visible="false">
abc Test
</div>
<asp:Button ID="Button1" OnClientClick="return editDetail();" runat="server"
Text="Add"/>
.js file
function editDetail() {
$('#divCust').css("display", "block");
}
What i missing in this code??Is it ok or what?? If any one have any idea about this than please help me in this.
Upvotes: 0
Views: 296
Reputation: 17831
visible
!= display
Write style="display: none;"
in your div instead of visible = "false"
and your code should work.
Upvotes: 2