Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Mar 2013
    Posts
    3
    Member #
    35834
    I'm building a site, shifteddd, which has 3 posters on a page. There is a plus button which, when pressed, moves the two outer posters inward so that they overlap (for purchasing all 3).

    Problem is that when they overlap, they go all weird. I've tried using z-indexes but I can't get them to work.

    Site is up for testing at shifteddd.

    Thanks in advance for any help!

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Code:
     
    $(".plus-toggle").click(function() {
    if($(".plus-toggle").text() === "+") {
    $(".poster-image-left").transition({ x: 300, y: 10 }, 750, "ease");
    $(".poster-image-left").transition({ rotate:"-5" });
    }
    else {
    $(".poster-image-left").transition({ x: 0, y: 0 }, 750, "ease");
    $(".poster-image-left").transition({ rotate:"0" });
    }
    });
    Change this to something like:
    Code:
     
    $(".plus-toggle").click(function() {
    if($(".plus-toggle").text() === "+") {
    $(".poster-image-left").transition({ x: 300 }, 750, "ease");
    }
    else {
    $(".poster-image-left").transition({ x: 0}, 750, "ease");
    }
    });
    This will slide the posters one on top of the other. You may have to adjust the X value, but it should get you close.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:58 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com