SHARE
TWEET

Untitled

a guest Jan 19th, 2020 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.    
  2.     toggleGroup: function(field)
  3.     {
  4.         var group = $(field).parent().next('.item_group');
  5.         if(group.is(":visible"))
  6.         {
  7.             $(field).html('[+]').attr('data-tip', lang("show", "store"));
  8.         }
  9.         else
  10.         {
  11.             $(field).html('[-]').attr('data-tip', lang("hide", "store"));
  12.         }
  13.  
  14.         group.slideToggle(300);
  15.     },
  16.  
  17.     toggleAllGroups: function(field)
  18.     {
  19.         var groups = $(field).parents('.realm_items').find('.hide_group');
  20.  
  21.         if(/\[\+\]/.test($(field).html()))
  22.         {
  23.             $(field).html('[-] Hide all item groups');
  24.  
  25.             groups.each(function()
  26.             {
  27.                 var group = $(this).parent().next('.item_group');
  28.                 $(this).html('[-]').attr('data-tip', lang("hide", "store"));
  29.                 group.slideDown(300);
  30.             });
  31.         }
  32.         else
  33.         {
  34.             $(field).html('[+] Show all item groups');
  35.  
  36.             groups.each(function()
  37.             {
  38.                 var group = $(this).parent().next('.item_group');
  39.                 $(this).html('[+]').attr('data-tip', lang("show", "store"));
  40.                 group.slideUp(300);
  41.             });
  42.         }
  43.     },
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top