Guest User

Untitled

a guest
May 22nd, 2012
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. Displaying submenu on left side of page when the horizontal main menu is clicked;show/hide div error
  2. <div id="middlebar">
  3. <ul class="menu">
  4. <li><%= Html.ActionLink("Home", "Index", "Home")%></li>
  5. <li id="lnkConfiguration" ><%= Html.ActionLink("Configuration", "Index", "User")%>/li>
  6. <li><%= Html.ActionLink("Application Authentication", "Index",ApplicationAuthentication")%></li>
  7. <li id="lnkUserAuthentication"><%= Html.ActionLink("User Authentication", "Index", "UserAuthentication")%></li>
  8. <li><%= Html.ActionLink("About", "About", "Home")%></li>
  9. </ul>
  10. </div>
  11. <div>
  12. <table width="100%">
  13. <tr valign="middle">
  14. <td style="width:150px" >
  15. <div id="divConfiguration" >
  16. <%Html.RenderPartial("SubMenuConfiguration"); %>
  17. </div>
  18. </td>
  19. <td><asp:ContentPlaceHolder ID="MainContent" runat="server" /></td>
  20. </tr>
  21. </table>
  22. </div>
  23.  
  24. <script language="javascript" type="text/javascript">
  25. $(document).ready(function() {
  26. $("#divConfiguration").hide();
  27. $('#lnkConfiguration').click(function() {
  28. $('#divConfiguration').show(); //.toggle(400);
  29. });
  30. })
  31. </script>
  32.  
  33. $(document).ready(function() {
  34. $("#divConfiguration").hide();
  35. $('#lnkConfiguration').click(function(e) {
  36. e.preventDefault();
  37. $('#divConfiguration').show(); //.toggle(400);
  38. });
  39. });
  40.  
  41. $.ajax({
  42. type: 'POST',
  43. url: 'divconfiguration.asp',
  44. data: 'page='$(this).attr('href'),
  45. success: function (msg) {
  46. $('#divConfiguration ').html(msg).show();
  47. }
  48. });
Advertisement
Add Comment
Please, Sign In to add comment