<script type="text/javascript">
$(document).ready(function () {
$(window).scroll(function() {
var fixmeTop = $('.fixme').offset().top;
var currentScroll = $(window).scrollTop();
if (currentScroll >= fixmeTop) {
$('.fixme').css({
position: 'fixed',
top: '0',
right: '0'
});
} else {
$('.fixme').css({
position:'inherit',
right:'0'
});
}
});
});
</script>
<asp:DataList ID="DataList1" runat="server">
<ItemTemplate>
(<%#Container.ItemIndex+1 %>)
<asp:Label ID="Label1" runat="server" Text='<%# bind("ques1") %>' Font-Bold="True"></asp:Label><br />
<table id="QuestionAnswer" runat="server">
<tr>
<td>
<asp:RadioButton ID="RadioButton1" onclick="RadioCheck(this);" runat="server" GroupName="Questions"
Text='<%# bind("ans1") %>' />
</td>
</tr>
<tr>
<td>
<asp:RadioButton ID="RadioButton2" onclick="RadioCheck(this);" runat="server" GroupName="Questions"
Text='<%# bind("ans2") %>' />
</td>
</tr>
<tr>
<td>
<asp:RadioButton ID="RadioButton3" onclick="RadioCheck(this);" runat="server" GroupName="Questions"
Text='<%# bind("ans3") %>' />
</td>
</tr>
<tr>
<td>
<asp:RadioButton ID="RadioButton4" onclick="RadioCheck(this);" runat="server" GroupName="Questions"
Text='<%# bind("ans4") %>' />
</td>
</tr>
</table>
</ItemTemplate>
</asp:DataList></td>
<td style="width: 50%" valign="top" align="right">
<h2>
Your answers
</h2>
<div class="fixme"> <table id="tbQuestion">
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<tr>
<td>
<itemtemplate>
<%#Container.ItemIndex+1 %>
</itemtemplate>
</td>
<td>
<asp:RadioButton ID="rblOptionOne" runat="server" GroupName="Answer" />
</td>
<td>
<asp:RadioButton ID="rblOptionTwo" runat="server" GroupName="Answer" />
</td>
<td>
<asp:RadioButton ID="rblOptionThree" runat="server" GroupName="Answer" />
</td>
<td>
<asp:RadioButton ID="rblOptionFour" runat="server" GroupName="Answer" />
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
hello sir how to get into previous position on scroll up