Hello! Im trying to show and hide a div element with the jquery toggle method. I have a linkbutton that onclick calls the javascript on the page. When clicking the linkbutton the page does a postback even when I declared the javascript function to return false. Someone got an idea how to solve this?
function toggleDiv(){
$('#app').toggle("fast");
}
</script>
<form runat="Server">
<asp:LinkButton ID="LinkButton1" runat="Server" OnClientClick="toggleDiv(); return false;" Text="Show/Hide"></asp:LinkButton>
<div id="app" style="background-color:Fuchsia; width:900px; height:300px;">
<p>jQuery Example </p>
</div>
</form>