sir,
i have a slide in div to display some dynamic data after button submit in it. If you open the div after page load it displays with message "Click on button".
But after submitting the slide effects stops immediately and not responding at all & even message is not updating in jquery slide box.
below is my code:
html:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Sample</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.3.js"></script>
<style type="text/css">
.panel {
width:300px;
float:left;
height:550px;
background:#d9dada;
position:fixed;
left:-290px;
}
.slider-arrow {
padding:5px;
width:10px;
float:left;
background:#d9dada;
font:400 12px Arial, Helvetica, sans-serif;
color:#000;
text-decoration:none;
position:relative;
left:0px;
}
</style>
<script type='text/javascript'>//<![CDATA[
$(function () {
$(function () {
$('.slider-arrow').click(function () {
if ($(this).hasClass('show')) {
$(".slider-arrow, .panel").animate({
left: "+=290"
}, 700, function () {
// Animation complete.
});
$(this).html('«').removeClass('show').addClass('hide');
}
else {
$(".slider-arrow, .panel").animate({
left: "-=290"
}, 700, function () {
// Animation complete.
});
$(this).html('»').removeClass('hide').addClass('show');
}
});
});
});//]]>
</script>
</head>
<body>
<center>
<form id="form1" runat="server" autocomplete="off">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div class="panel"><%=result%></div>
<a href="javascript:void(0);" class="slider-arrow show">»</a>
<br />
<asp:Button ID="Button1" runat="server" Text="Submit" />
</ContentTemplate>
</asp:UpdatePanel>
</form>
</center>
</body>
</html>
vb:
Public result As String = ""
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
result = "Click on button"
End If
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
result = "Clicked"
End Sub