Reputation: 11
I'm trying to open a new .html page whenever someone clicks on cptmorgan.jpg, that's the only image I need to open a new page when clicked however the Jmorph script is already using the a href in the
Code:
<body>
<div id="container">
<div class="jmorph">
<div class="imageContainer">
<div class="image">
<div class="currentImg" style>
<div class="nextImg"></div>
</div>
</div>
</div>
<div class="clearfix">
<a href="#previous" class="previous">< Prev</a>
<div class="bandContainer">
<ul class="band">
<li><a href="amanda.jpg">amanda</a></li>
<li><a href="brandi.jpg">brandi</a></li>
<li><a href="brittany.jpg">brittany</a></li>
<li><a href="cptmorgan.jpg">captain morgan</a></li>
<li><a href="janet.jpg">janet</a></li>
<li><a href="jonathan.jpg">jonathan</a></li>
<li><a href="kro-j.jpg">kro-j</a></li>
<li><a href="lindsay.jpg">lindsay</a></li>
<li><a href="noal.jpg">noah</a></li>
<li><a href="samantha.jpg">samantha</a></li>
<li><a href="trish.jpg">trish</a></li>
<li><a href="Blue.png">Blue</a></li>
<li><a href="stephen.jpg">Stephen</a></li>
<li><a href="melissa.jpg">Melissa</a></li>
<li><a href="Matt.jpg">Matt</a></li>
<li><a href="mitchandseth.jpg">Mitch and Seth</a></li>
</ul>
</div>
<a href="#next" class="next">Next ></a>
</div>
</div>
</div>
<script>
$(".jmorph").jmorphGallery();
</script>
</body>
</html>
Upvotes: 1
Views: 116
Reputation: 1796
If you want it to open in a new tab, then you have to use the target attribute in the anchor tag
<a href="cptmorgan.jpg" target="_blank">captain morgan</a>
And use correct paths for the images
Upvotes: 1
Reputation: 539
after Jmorph loaded replace href attribute (with javascript) to the one you desire
to make it easier you could add id to the href you want replace
should work :)
Upvotes: 1