I am currently trying to use Jquery to change the href attribute of a link within a DIV so that the URL is changed from file.html to file.jpg...
<div class="gallery">
<a href="file.html">My File</a>
and I want to change it to
<div class="gallery">
<a href="file.jpg">My File</a>
I have seen the post about changing the href attribute using Jquery and understand some of it, but I am at a complete loss about how to change all links ending .html within the div to .jpg. The filename doesn't need to change. Would anyone be able to point me in the right direction for help?