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

  • Home
  • SEARCH
  • 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 6233263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:16:04+00:00 2026-05-24T10:16:04+00:00

Looking to tweak this script: http://css-tricks.com/examples/InfoGrid/ I’ve added an image within each dt, I’d

  • 0

Looking to tweak this script: http://css-tricks.com/examples/InfoGrid/

I’ve added an image within each “dt”, I’d like it to be a specific size when closed & then animate larger when that “dt” is selected (much like how the text is). Of course then return to it’s original size when a different “dt” is selected.

Also would like more control over things that are in their “normal state” vs. “selected state”. Any ideas?

<div id="page-wrap">
    <div class="info-col">
        <h2>Superman</h2>
        <a class="image superman" href="http://jprart.deviantart.com/art/Batman-and-Superman-64545242">View Image</a>
    <dl>
          <dt><img src="http://s3.buysellads.com/1252508/65529-1308680363.jpg"> Other text</dt>
          <dd>Stuff Here1</dd>

          <dt><img src="http://s3.buysellads.com/1252508/65529-1308680363.jpg"> Other text 2</dt>
          <dd>Stuff Here2</dd>
</div>

            <div class="info-col">
        <h2>Superman 2</h2>
        <a class="image superman" href="http://jprart.deviantart.com/art/Batman-and-Superman-64545242">View Image 2</a>
    <dl>
          <dt><img src="http://s3.buysellads.com/1252508/65529-1308680363.jpg"> Other text 3</dt>
          <dd>Stuff Here3</dd>

          <dt><img src="http://s3.buysellads.com/1252508/65529-1308680363.jpg"> Other text 4</dt>
          <dd>Stuff Here4</dd>
</div>

</div>

The JS:

$(function() {

// Set up variables
var $el, $parentWrap, $otherWrap, $imgBig,
    $allTitles = $("dt").css({
        padding: 5, // setting the padding here prevents a weird situation, where it would start animating at 0 padding instead of 5
        "cursor": "pointer" // make it seem clickable
    }),
    $allCells = $("dd").css({
        position: "relative",
        top: -1,
        left: 0,
        display: "none" // info cells are just kicked off the page with CSS (for accessibility)
    });





// clicking image of inactive column just opens column, doesn't go to link   
$("#page-wrap").delegate("a.image","click", function(e) { 

    if ( !$(this).parent().hasClass("curCol") ) {         
        e.preventDefault(); 
        $(this).next().find('dt:first').click(); 
    } 


});

// clicking on titles does stuff
$("#page-wrap").delegate("dt", "click", function() {

    // cache this, as always, is good form
    $el = $(this);

    // if this is already the active cell, don't do anything
    if (!$el.hasClass("current")) {

        $parentWrap = $el.parent().parent();
        $otherWraps = $(".info-col").not($parentWrap);

        // remove current cell from selection of all cells
        $allTitles = $("dt").not(this);

        // close all info cells
        $allCells.slideUp();


        // return all titles (except current one) to normal size
        $allTitles.animate({
            fontSize: "14px",
            paddingTop: 5,
            paddingRight: 5,
            paddingBottom: 5,
            paddingLeft: 5
        });

        // animate current title to larger size            
        $el.animate({
            "font-size": "18px",
            paddingTop: 10,
            paddingRight: 15,
            paddingBottom: 0,
            paddingLeft: 10
        }).next().slideDown();

        // make the current column the large size
        $parentWrap.animate({
            width: 351
        }).addClass("curCol");

        // make other columns the small size
        $otherWraps.animate({
            width: 140
        }).removeClass("curCol");

        // make sure the correct column is current
        $allTitles.removeClass("current");
        $el.addClass("current");  

    }

});


$("#starter").trigger("click");

});

  • 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-05-24T10:16:05+00:00Added an answer on May 24, 2026 at 10:16 am

    The answer that worked for me is:

           $el.find('img').animate({         //enlarge image(s)
         width: 225
        }).parent().next().slideDown();
    
    
        $allTitles.find('img').animate({         //reduce image(s)
         width: 125
        }).parent().next().slideDown();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Looking for feedback on : http://code.google.com/p/google-perftools/wiki/GooglePerformanceTools
I currently start a shell script from my Java by code looking like this:
I understand this is going to be fairly subjective, but I am looking for
I'm looking for a way to programatically tweak the particulars of a file association
I have an internet shortcut on my desktop, with the contents looking like this:
I was looking for a script that allows me to deselect a radio button.
I've been looking around but I haven't seen anything that addresses this so I'm
I am looking for some tools or examples of code to help me build
Looking for an example that: Launches an EXE Waits for the EXE to finish.
Looking for C# class which wraps calls to do the following: read and write

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.