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 4052640
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T14:20:42+00:00 2026-05-20T14:20:42+00:00

There is a nifty flash banner located here: http://osc4.template-help.com/drupal_30779/ . I was wondering if

  • 0

There is a nifty flash banner located here: http://osc4.template-help.com/drupal_30779/. I was wondering if there is a jquery library out there that allows me to achieve the same effect. (click, slide,expand). Thanks in advance

  • 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-20T14:20:43+00:00Added an answer on May 20, 2026 at 2:20 pm

    I wrote you a little answer that is a good start. The working code is at http://jsfiddle.net/fxBjw/ here it is in pieces

    HTML

    <div id="container">
        <ul>
            <li class="block" id="a"></li>
            <li class="block" id="b"></li>
            <li class="block" id="c"></li>
            <li class="block" id="d"></li>
            <li class="block" id="e"></li>
        </ul>
    </div>
    

    CSS

    #container {
        height: 100px;
        width: 245px;
        border: #000 1px solid;
        overflow: hidden;
    }
    /*I am not great with css so the only thing i think you could do better is the positioning.
    Maybe style everything in JS and use position absolute
    there also may be a better way to handle the overflow but this is a good jq start*/
    .block {
        width: 45px;
        height: 100px;
        display: inline-block;
        margin: 0px;
        position: relative;
        background-repeat: no-repeat;
    }
    
    #a {
        background: url(http://rndimg.com/ImageStore/OilPaintingOrange/50x100_OilPaintingOrange_d190c94ef0c845399e2849fd7e9d54de.jpg);}
    #b {
        background: url(http://rndimg.com/ImageStore/OilPaintingBlue/50x100_OilPaintingBlue_44398b9cfff447938d5b02c56e275611.jpg);}
    #c {
    background: url(http://rndimg.com/ImageStore/OilPaintingGreenReal/50x100_OilPaintingGreenReal_d3284c223f484ad584d4cc6d9de29ba5.jpg);
    }
    #d {background: url(http://rndimg.com/ImageStore/OilPaintingGreen/50x100_OilPaintingGreen_03938e7dbfa74b0f861d9a0851a34455.jpg); }
    #e {background: url(http://rndimg.com/ImageStore/OilPaintingBlueReal/50x100_OilPaintingBlueReal_d2e4856d7e4e4224b42ced5cf6675132.jpg); }
    

    JS

    //This creates the click function in jquery
    $('#container li').click(function (event) {
        //Create a var for the index of the LI
        var ind = $(this).index();
        //Move the LI right to the edge I am not good with stying so there is probably a better way to do this also in the CSS
        //The set up is you move it to the right * the number of elements it is in the list
        $(this).animate({
           'right': ind*50+'px'
        });
        //Now for all the other list items
        $('#container li').each(function () {
            //Check if the items are after the one clicked if so move them off to the right
        if ($(this).index() > ind) {
                 $(this).animate({ 'left': '200px'});
            //if they are smaller mover them to the left
        } else if ($(this).index() < ind ){
            $(this).animate({ 'right': '200px'});
        }});
    });
    

    I did not add a reset button just click run again the return animate should be pretty straight forward.

    PS. Thanks for giving me an excuse not to do my HW

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

Sidebar

Related Questions

On the iPad gallery at http://movies.apple.com/ipad/gallery/ there is a nifty 3D-ish view when you
for Linux, there is a nifty little library called xbindkeys that (surprise) binds commands
I am wondering if there is an easy way to incorporate the nifty badge
Are there any implementations of all the nifty Selenium on Rails methods like wait_for_visible
Using NArray, is there some nifty way to create masks of arrays with values
So there's this nifty _trackPageview() api method on a tracker object, but is there
For instance, I know of Link, DependentUpon and SubType. I am wondering if there
I am using Webmatrix to develop a pretty nifty site ad was wondering how
Is there a nifty trick for PHP's array_pop() in Javascript? In lieu of any
There is a conversion process that is needed when migrating Visual Studio 2005 web

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.