title: Link jump to another page reference and trigger click to display a display none div
body: <p>im facing some trouble to achieve my goal,</p>
  
  <p>I have a "HELP" page where i display the FAQs, the privacy policy, the terms of use and ect..</p>
  
  <p>I have a list of links on the right of the page like a menu and when one is clicked, it show the div that correspond of it's content and some "active style is applied on the link in the menu</p>
  
  <p>I've used some jquery to achieve this, and everything is working fine. The only problem now, is for exemple in anothers pages i have a footer displaying some usefull links like faq, privacy or terms of uses.</p>
  
  <p>When i click on the one of these, it does redirect to my reference page (the help page) but doesn't seems to make appears the content, it stay stuck on the default display.</p>
  
  <p>i'll show you my function i've tried to handle this, but still doesn't seems to work</p>
  
  <pre><code>&lt;a class="termsLink" href="https://kefiga.com/faqtry/#Terms-and-conditions"&gt;terms&lt;/a&gt;
  
  &lt;a class="privacyLink" href="https://kefiga.com/faqtry/#Privacy-policy"&gt;Privacy&lt;/a&gt;
  
  
  
  $('.termsLink').click(function(){
  $(document).ready(function(){
  $('#Terms-and-conditions').trigger('click');
    });
  });
  
    $('.privacyLink').click(function(){
  $(document).ready(function(){
  $('#Privacy-policy').trigger('click');
    });
  });
  </code></pre>
  
  <p>Here is a snipept of my code on the HELP PAGE</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>//HIDE AND SHOW DIVS
  
       $(document).ready(function() {  
                        
        $(".copen").click(function() {
    
           $(".c").hide();
   
           var cid = $(this).data("c");
           $("#"+cid).show();   
    
        });
    
     });
      
      //change menu links style
  $(".toggleLinks").click(function(){
      // previously active
      $(".activeStyle").toggleClass("activeStyle inactiveStyle");
      $(this).toggleClass("activeStyle inactiveStyle");
  });
      </code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.inactiveStyle{
      border:2px solid #0f2c41;
      color:#0f2c41;
      padding: 1em;
      margin-bottom:10%;
      width:60%;
      border-radius:5px;
      cursor:pointer;
      list-style: none;
      font-weight:600;
      font-size:1.1em;
      transition:0.4s;
      display:inherit;
      list-style: none;
      text-decoration: none;
  }
  
  .inactiveStyle:hover{
      color:#fff;
      background-color:#0f2c41;
      border:2px solid #0f2c41;
      padding: 1em;
      margin-bottom:10%;
      width:80%;
      border-radius:5px;
      cursor:pointer;
      list-style: none;
      font-weight:600;
      font-size:1.1em;
      transition:0.4s;
      text-decoration: none;
  }
  
  .activeStyle{
      color:#fff;
      background-color:#0f2c41;
      border:2px solid #0f2c41;
      padding: 1em;
      margin-bottom:10%;
      width:80%;
      border-radius:5px;
      cursor:pointer;
      list-style: none;
      font-weight:600;
      font-size:1.1em;
      transition:0.4s;
      display:inherit;
      text-decoration: none;
  }
  
  .menuListSide{
      list-style: none!important;  
  }
  .menuPage{
      top:15%!important;
      margin-left:2%!important;
      padding-top:5%;
  }
         
  .content{
      width:70%!important;
      padding-left: 25%;
      margin:auto;
  }
  
  #c1{
      text-align: center;
  } 
  
  
  #c5{
      text-align: justify;
  }
  
  .page-section{
      padding-top:15%;
  }
  
  body{
      height:100%;
  }
  
  #container{
      width:100%;
      word-break: break-word;
  } 
  
  #box{
      width:95%;
      margin:0 auto;
      box-sizing: border-box;
  }
  .menuPage{
      float:left;
      position:sticky;
      top:1%;
      margin-left:-2%;
        
   }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div id="container"&gt;
  
    &lt;div id="box"&gt;  
        &lt;div class="menuPage"&gt;
            &lt;ul class="menuListSide"&gt;
                &lt;li class="phoneInline1"&gt;&lt;a id="a1"  href="#"class=" toggleLinks activeStyle copen" data-c="c1" data-d="d1"&gt;F.A.Q&lt;/a&gt;&lt;/li&gt;   
               &lt;li class="phoneInline1"&gt;&lt;a id="a2" href="#"class=" toggleLinks inactiveStyle copen " data-c="c2" data-d="d2" &gt;Size Guide&lt;/a&gt;&lt;/li&gt;
                &lt;li class="phoneInline2"&gt;&lt;a id="a3" href="#" class="copen toggleLinks inactiveStyle" data-c="c3" data-d="d3"&gt;Delivery &amp; Returns&lt;/a&gt;&lt;/li&gt;
                &lt;li class="phoneInline2"&gt;&lt;a id="Privacy-policy" href="#" class="copen toggleLinks inactiveStyle" data-c="c4" data-d="d4"&gt;Privacy Policy&lt;/a&gt;&lt;/li&gt;
                &lt;li class="phoneInline3"&gt;&lt;a id="Terms-and-conditions" href="#" class=" copen toggleLinks inactiveStyle" data-c="c5"data-d="d5"&gt;Terms &amp; Conditions&lt;/a&gt;&lt;/li&gt;
                &lt;li class="phoneInline3"&gt;&lt;a id="a6" href="#"class=" copen toggleLinks inactiveStyle" data-c="c6"data-d="d6"&gt;Copyright&lt;/a&gt;&lt;/li&gt;
                &lt;!--&lt;li&gt;&lt;a id="a7" href="#" class="  copen  toggleLinks inactiveStyle" data-c="c7"data-d="d7"&gt;Credits&lt;/a&gt;&lt;/li&gt;--&gt;
            &lt;/ul&gt;
        &lt;/div&gt;
        &lt;div class="content"&gt;
                
          &lt;div id="c1" class="c page-section"&gt;
            &lt;h2&gt;Content 1 / DEFAULT CONTENT &lt;/h2&gt;
  &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequatLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat&lt;/p&gt;              
  
  
          &lt;/div&gt; 
          &lt;div id="c2" class="c page-section" style="display:none"&gt;
            &lt;h2&gt;Content 2&lt;/h2&gt;
  &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequatLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat&lt;/p&gt;
  
          &lt;/div&gt;
          &lt;div id="c3" class="c page-section" style="display:none"&gt;
            &lt;h2&gt;Content 3&lt;/h2&gt;
  &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequatLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat&lt;/p&gt;
                                                   
          &lt;/div&gt;
            
          &lt;div id="c4" class="c page-section" style="display:none"&gt;
            &lt;h2&gt;Content 4&lt;/h2&gt;
  &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequatLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat&lt;/p&gt;
  
          &lt;/div&gt;
          &lt;div id="c5" class="c page-section" style="display:none"&gt;
            &lt;h2&gt;Content 5&lt;/h2&gt;
  &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequatLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat&lt;/p&gt;
                                                   
          &lt;/div&gt;
             &lt;div id="c6" class="c page-section" style="display:none"&gt;
               &lt;h2&gt;Content 6&lt;/h2&gt;
  &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequatLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat&lt;/p&gt;
                                                   
          &lt;/div&gt;  
            
            
            
            
            
        &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Thanks a lot everyone for your help !</p>