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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:03:08+00:00 2026-05-23T19:03:08+00:00

I am trying to build a thumbnail slider(not sure it is the name) exactly

  • 0

I am trying to build a thumbnail slider(not sure it is the name) exactly like this, but I am stuck since I am not really good at jquery animation API. so far I have this code:
http://jsfiddle.net/bingjie2680/mwxzT/13/, but it is not working expectedly, can somebody please help me with this, or give me some pointers or links to tutorials of how to implement it. I have searched the internet, couldn’t find anything relevant. thanks for reading.

update:
the problem is that when the red box slides, it is not smoothly, and the left side of red box should never moves inside the black box. always align both left and right side with the black box.

  • 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-23T19:03:09+00:00Added an answer on May 23, 2026 at 7:03 pm

    Do you like this one? 🙂

    MOUSEMOVE GALLERY SLIDER

    HTML:

    <div id="mmGallery_container">   
        <div id="mmGallery">
            <img src="image1.jpg" style="height:<!--set first image height-->px;"/>
            <img src="image.jpg"/>
            <img src="image.jpg"/>
            <img src="image.jpg"/>
            <img src="image.jpg"/>
        </div>  
    </div>
    

    CSS:

    /* ***** mmGallery ***** */   
    #mmGallery_container{
        position:relative;
        top:30px;
        z-index:0;
        margin:20px auto;
        /*height: 200px; will be handled by jQuery */
        width:560px;   /*  SET WIDTH!  */
        overflow:hidden;
        -moz-box-shadow:     5px 8px 50px #000;
        -webkit-box-shadow: 5px 8px 50px #000;
        box-shadow:         5px 8px 50px #000;
        border:12px solid #000;
        background:#000;
    }
    #mmGallery{
        cursor:col-resize;
        position:relative;
    }
    #mmGallery img{
        position:relative;
        float:left;
    }
    

    jQuery:

    $(function(){
        // roXon mmGallery
    
        //####### SETUP SPEED ######//
        mmGalSpeed = 20;              // higher number = slower movements
        //##########################//
    
        var setHeight = $('#mmGallery img:eq(0)').height();
        $('#mmGallery_container').css({ height: setHeight });
    
    });
    $(window).load(function(){
        /*________________mmGallery _________________*/
    
        sumW = 0;   
        imgH = 0;
        imgH = $('#mmGallery img:eq(0)').height(); 
        $('#mmGallery img').css({ height: imgH });    
        $('#mmGallery_container').css({ height: imgH });
    
        $('#mmGallery img').each(function(){
            sumW += $(this).width();
            $('#mmGallery').width(sumW);
        });    
    
        wDiff1 = $('#mmGallery_container').outerWidth(true);
        wDiff2 = $('#mmGallery').width();
        wDiff = (wDiff2/wDiff1)-1;  
        mouseX = 0;
        $("#mmGallery_container").mousemove(function(e) {
        mouseX = (e.pageX - this.offsetLeft);      
        });
    
        var xSlider = $("#mmGallery");
        var posXdec = 0;
        setInterval(function(){     
            posXdec += (mouseX - posXdec) / mmGalSpeed;
            posX = posXdec;
    
            xSlider.css({marginLeft:  '-'+ (posX * wDiff) +'px' }); // instead 'marginLeft' use 'left' for absolute pos. #mmGallery
        }, 10);
    
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to build a 'last user login' script but im not sure how
I'm trying to build a video thumbnailer using gst-python, it looks like this. from
I was trying Build For Archiving application (from Titanium Mobile) with xCode 4.4, but
I'm trying build a MVC framework, but I'm confused about manage themes. Well... I
Trying to build out an exception if move.UserId does not equal currentUserId then Redirect
Trying to build openssl-fips-2.0 with NDK, before I was lucky found this link and
I'm trying build a regex that will replace any characters not of the format:
I'm tring to build a thumbnail hover effect. It works in every browser, but
Trying to build my android project with Buildr (Apache), but can't find any info
I'm trying build this network connection using BroadcastReceiver. When connection doesnt exist it will

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.