- History
  • - History
  • - History
  • link page to another with id

    54 Views Asked by At

    i have this code here:

     <ul>
                    <li class="underUl"><a class="ulA" name="History" href="about.php#History"> - History</a></li>
                    <li class="underUl"><a class="ulA" name="Concept" href="about.php#Concept"> - The Concept</a></li>
                    <li class="underUl"><a class="ulA" name="Choose_CST" href="about.php#Choose_CST">- Why Choose CST?</a></li>
                    <li class="underUl"><a class="ulA" name="Management" href="about.php#Management">- Management</a></li>
                    <li class="underUl"><a class="ulA" name="Departments" href="about.php#Departments">- Department</a></li>
    
                </ul>
    

    and in the other page i have these divs:

    <div id="History">history</div>
    <div id="Concept">concept</div>
    <div id="Choose_CST">CST</div>
     <div id="Management">management</div>
      <div id="Departments">Departments</div>
    

    so i want to open on the div that the user choose refering to the id in <ul> tag? any idea? for example if a user click on management i want to automatically open the other page on management div etc... thanks in advance

    1

    There are 1 best solutions below

    0
    klugjo On

    The code you have written should work but you can try to use

    <div id="History" name="History">history</div>
    <div id="Concept" name="Concept">concept</div>
    <div id="Choose_CST" name="Choose_CST">CST</div>
    <div id="Management" name="Management">management</div>
    <div id="Departments" name="Departments">Departments</div>