Preview:
/*--- hide left side items ---*/
.subscriber li.menu-pipeline,
.subscriber li.menu-mdf,
.subscriber li.menu-prospect {display: none; }
 
 
 
// JS to show left nav items
jQuery(document).ready(function ($) {
 
 
  var isLoggedIn = !!$(".logged-in").length;
 
  var pipelineItem = "li.menu-pipeline";
  var mdfItem = "li.menu-mdf";
  var prospectPagesItem = "li.menu-prospect";
 
  var eliteCanSeePages = !!(isLoggedIn && abUser.group_id.indexOf("31") > -1);
  var premierCanSeePages = !!(isLoggedIn && abUser.group_id.indexOf("32") > -1);
 
  function showPipeline() {
    return $(pipelineItem).show();
  }
 
  function showMdf() {
    return $(mdfItem).show();
  }
 
  function showProspectPages() {
    return $(prospectPagesItem).show();
  }
 
  function scenarioDriver() {
    for (scenario of scenarios) {
      if (scenario.page && scenario.condition) {
        scenario.outcome();
        break;
      }
    }
  }
 
  var scenarios = [
    {
      condition: eliteCanSeePages || premierCanSeePages,
      page: true,
      debugger: [
        "Logic: if user is in group id 31 or 32, show pipeline mdf and prospect pages",
      ],
      outcome: function () {
        showPipeline();
        showMdf();
        showProspectPages();
      },
    },
  ];
 
  scenarioDriver();
}); // end ready function
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter