Advertisement
Goddard

My accordion like thing

Feb 4th, 2013
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.85 KB | None | 0 0
  1.     $("#review-accordion").addClass("ui-accordion")
  2.     .find("h3")
  3.     .addClass("ui-corner-top ui-corner-bottom")
  4.     .click(
  5.         function()
  6.         {
  7.             if($(this).find("b").text() == "+")
  8.                 $(this).find("b").text("-");
  9.             else
  10.                 $(this).find("b").text("+");
  11.             $(this).next().slideToggle();
  12.             return false;
  13.         })
  14.     .next()
  15.     .addClass("ui-accordion-content ui-helper-reset")
  16.     .hide();
  17.  
  18.     $(".viewDetailsLink").click(function(e)
  19.     {
  20.         e.preventDefault();
  21.         var data = $(this).attr("data");
  22.         $(this).ajaxCall('backoffice.getMemberDetails', 'memberID=' + $(this).attr('memberID'));
  23.  
  24.        $("#viewDetailsDialog").dialog(
  25.        {
  26.             close: function(event, ui) {$("#viewDetailsDialog").html('');},
  27.             height: 310,
  28.             show: "blind",
  29.             hide: "explode",
  30.             modal: true,
  31.             width: 500,
  32.             buttons: {"Close": function(){$(this).dialog("close");},}
  33.         });
  34.     });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement