use event click to show html pages in a section

0

Requesting your help to verify my code and create a website with HTML5 and CSS3, trying to click on a menu text to update a "section" with a different web page but at the time it runs the click event does not perform any action; Javascript has been used to try to do it.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!DOCTYPE html>
<html>

<head>
  <title>Portafolio Digital</title>
  <link rel="stylesheet" href="Style.css">
  <script type="text/javascript">
    $(document).ready(function() {
      $("#ejercicio1").click(function() {
        $("#contenido").load("new 1.html");
      });
    });
  </script>
</head>

<body>
  <div id="contenedor">
    <header id="parteUno"></header>
    <header id="imagen"></header>
    <header id="parteDos"></header>
    <section id="contenido"></section>
    <section id="contenidoDos">
      <ol id="menu">
        <li><input type="checkbox" name="list" id="nivel1-1"><label for="nivel1-1">Unidad I</label>
          <ul class="interior">
            <li><input type="checkbox" name="list" id="nivel2-1"><label for="nivel2-1">Ejercicios</label>
              <ul class="interior">
                <li><a href="#" id="ejercicio1">Ejercicio 1</a></li>
                <li><a href="#" id="ejercicio2">Ejercicio 2</a></li>
              </ul>
            </li>
            <li><input type="checkbox" name="list" id="nivel2-2"><label for="nivel2-2">Guias</label>
              <ul class="interior">
                <li><a href="#">Guia 1</a></li>
                <li><a href="#">Guia 2</a></li>
              </ul>
            </li>
          </ul>
        </li>
      </ol>
    </section>
  </div>
</body>

</html>

Greetings .-

    
asked by MarvinBoni 01.03.2018 в 18:02
source

0 answers