Guest User

Updated Code

a guest
Nov 22nd, 2019
149
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script
  2.   src="https://code.jquery.com/jquery-1.10.1.js"
  3.   integrity="sha256-663tSdtipgBgyqJXfypOwf9ocmvECGG8Zdl3q+tk+n0="
  4.   crossorigin="anonymous"></script>
  5. <script type="text/javascript" src="mysite/jquery.SPServices.min.js"></script>
  6.  
  7. <script type="text/javascript">
  8. $(document).ready(function() {
  9.   $().SPServices({
  10.     operation: "GetGroupCollectionFromUser",
  11.     userLoginName: $().SPServices.SPGetCurrentUser(),
  12.     async: false,
  13.        completefunc: function (xData, Status) {
  14.        var xml = xData.responseXML.xml;
  15.        var flag = ($(xData.responseXML).find("Group[Name='Dev Site Add-ins Members']").length != -1);
  16.        if (flag)
  17.   {
  18.          //To Hide Column Header
  19. document.querySelector("div[name^='Comments']").parentElement.style.display = "none";
  20.  
  21. // To Hide all rows for the Comments column
  22. var tdElementsNodeList = document.querySelectorAll("td[class^='ms-vb-lastCell']");
  23. for(var i = 0; i < tdElementsNodeList.length; i++) {
  24.     tdElementsNodeList[i].style.display = "none";
  25. }      
  26.   }
  27.      }
  28.   });
  29. });
  30. </script>
RAW Paste Data