Is there a way to show/hide a panel when clicking on a link button? This functionality works correctly on a simple page, but fails to work when implemented on a Master Page.
Here is the code snippet I am using:
<%@ Page Language="C#" MasterPageFile="~/Master_Institute.master" AutoEventWireup="true" CodeFile="frm_Student_Renewal_Reg.aspx.cs" Inherits="frm_Student_Renewal_Reg" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type='text/javascript' src='http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js'></script>
<style type="text/css">
.panel{
display:none;
}
.style1{
width: 620%;
}
</style>
<script type="text/javascript">
$(function() {
$("#Link1").click(function(evt) {
evt.preventDefault();
$('#panelText').slideToggle('slow');
});
});
</script>
<table>
<tr>
<td>
<asp:HyperLink ID="Link1" runat="server" NavigateUrl="#">
Using slideToggle
</asp:HyperLink>
<br />
<asp:Panel ID="panelText" runat="server" CssClass="panel">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc turpis nunc, placerat ac, bibendum non, pellentesque nec, odio.
</asp:Panel>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
</asp:Content>
Can anyone help me identify what I might be doing wrong?