Why is this not changing images when clicking on link…. jQuery

Code not working, it only changes the caption and not the image? I would for my jQuery code to make it so that when i click on the link the image changes to the next image in the HTML.

<!DOCTYPE html> <html lang="en"> <head>     <meta charset="utf-8">     <title>Image Gallery</title>     <link rel="stylesheet" href="main.css">     <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>     <script src="image_gallery.js"></script> </head>  <body> <main>     <h1>Image Gallery</h1>     <ul id="image_list">         <li><a href="images/casting1.jpg" title="Casting on the Upper Kings">Upper Kings</a></li>            <li><a href="images/casting2.jpg" title="Casting on the Lower Kings">Lower Kings</a></li>         <li><a href="images/catchrelease.jpg" title="Catch and Release on the Big Horn">Big Horn</a></li>         <li><a href="images/fish.jpg" title="Catching on the South Fork">South Fork</a></li>         <li><a href="images/lures.jpg" title="The Lures for Catching">Lures</a></li>     </ul>     <h2 id="caption">Casting on the Upper Kings</h2>     <p id="gallery">         <img src="images/casting1.jpg" alt="Image Gallery area" id="image">     </p> </main> </body> </html>   enter code here