user3206759
user3206759

Reputation: 11

Jquery slideshow can't open new page/html link when clicking on images

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

  • element. Anybody got an idea?

    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">&lt;&nbsp;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&nbsp;&gt;</a>
                </div>
            </div>
    </div>
    <script>
    $(".jmorph").jmorphGallery();
    </script>
    </body>
    </html>
    

    Upvotes: 1

    Views: 116

  • Answers (2)

    Omer
    Omer

    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

    hesar
    hesar

    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

    Related Questions