Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

71
Views
Using jQuery to Load External Files

I am trying to load an external file within my HTML, but nothing happens.

My HTML File

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Double Navigation Bar</title>
    <link rel="stylesheet" href="Mainpage.css">
  <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
  <script src= "mainp.js"></script>
</head>
<body>
<div class="nav1" id="nav1">
          <ul>
          <li><a href="SchoolHistory">School History</a></li>
          <li><a href="SchoolTimes">School Times</a></li>
          <li><a href="SchoolFees">School Fees</a></li>
          <li><a href="" id="reason">Why?</a></li>
        </ul>
  </div>
<div id="article" class="article"></div>
<div class="aside">Aside</div>
  <div class="footer">
        <p>Contact Number:  &bull; Email Address: </p>
  </div>
</div>
</body>
</html>

My js File

$(document).ready(function(){
    $("reason").click(function(){
        $("#article").load("Reason.html");
    });
});

This is the external file I'm trying to run. Reason.html

<H1>Reasons Page</H1>
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!