Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8751415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:02:36+00:00 2026-06-13T13:02:36+00:00

Horizontal images enlarge and return to normal but vertical images enlarge and then return

  • 0

Horizontal images enlarge and return to normal but vertical images enlarge and then return horizontal not vertical. I have this fiddle. I’m not sure but believe the issue is in jQuery. I’m very new to jQuery but this seems to be the only way to achieve what I need since each image is also a form submit button. This can be seen at http://www.starcuts10.com/poems

CSS:

#container {
    display: block;
    width: 100%;
    position: relative;
}

.img {
    position: relative;
    z-index: 0;
}

.end {
    margin-right: 0;
}

.clear {
    clear: both;
}

.img a img {
    position: relative;
    border: 0 solid #fff;
 }

.form_align {
    display: inline;
    float: left:
}

jQuery:

$(document).ready(function() {
    var cont_left = $("#container").position().right;

    if ($('span').hasClass('horz')) {
        $("input").hover(function() {
            // hover in
            $(this).parent().parent().css("z-index", 1);
            $(this).animate({
                height: "405",
                width: "638",
                right: "+=50",
                bottom: "+=150"
            }, "fast");
        }, 
        function() {
            // hover out
            $(this).parent().parent().css("z-index", 0);
            $(this).animate({
                height: "250",
                width: "425",
                right: "-=50",
                bottom: "-=150"
            }, "fast");
        });


        $(".img").each(function(index) {
            var right = (index * 160) + cont_left;
            $(this).css("right", right + "px");
        });
    } 
    else {
        $("input").hover(function() {
            // hover in
            $(this).parent().parent().css("z-index", 1);
            $(this).animate({
                height: "638",
                width: "405",
                right: "+=50",
                bottom: "+=150"
            }, "fast");
        }, 
        function() {
            // hover out
            $(this).parent().parent().css("z-index", 0);
            $(this).animate({
                height: "425",
                width: "250",
                right: "-=50",
                bottom: "-=150"
            }, "fast");
        });

        $(".img").each(function(index) {
            var right = (index * 160) + cont_left;
            $(this).css("right", right + "px");
        });
    }
});

HTML:

<div id="container">
    <table>
        <tr>
            <span class="horz">
                <span class="vert">    
                    <td>
                        <form class="form_align" method ="post" action="#">
                            <a href=""><input type="image" src="http://starcuts10.com/images/blue_box.png" class="img"></a>
                            <input type="hidden" name="img" value="http://starcuts10.com/images/blue_box.png"> 
                            <input type="hidden" name="poem" value="">
                        </form>
                    </td>
                </span>
                <span class="vert">    
                <td>
                    <form class="form_align" method ="post" action="#">
                        <a href=""><input type="image" src="http://starcuts10.com/images/red_box.png" class="img"></a>
                        <input type="hidden" name="img" value="http://starcuts10.com/images/red_box.png"> 
                        <input type="hidden" name="poem" value="">
                    </form>
                </td>
            </span>  
        </tr>
    </table><br><br><br>
</div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T13:02:37+00:00Added an answer on June 13, 2026 at 1:02 pm

    There is something wrong with you jquery logic.

    You don’t need if ("span.horz") { .. } else { .. }

    what you need to do is have the hover effect on both: $(".horz input") and $(".vert input").

    Also, the html is wrong. spans should be inside the TDs

    This is a working fiddle: http://jsfiddle.net/RwJhn/1/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to have images displayed in a horizontal list. This is what
I've made gradient images using PHP GD horizontal and vertical but how can you
I have a listbox with images inside it. I want a horizontal row of
I have 2 images in a horizontal linear layout. I want one to sit
I have a horizontal scrollView which contains 2 images.The scrollView is circular.What I want
I have multiple images and want to find out if each image horizontal or
I have a horizontal unordered list of 2 images. Intent is to make the
I have horizontal set of 4 images. The resize function works on mouseover event.
I have a script that turns an unordered list of images into a horizontal
I have a horizontal menu of five images. All of these 5 images have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.