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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:03:47+00:00 2026-05-29T05:03:47+00:00

hey there.. need some advice again :) I’m working on a project with a

  • 0

hey there.. need some advice again 🙂

I’m working on a project with a filterable portfolio [based on this plugin link: http://www.gethifi.com/blog/a-jquery-plugin-to-create-an-interactive-filterable-portfolio-like-ours.

the portfolio items are shown in a horizontal slider which is adding scroll areas (hot spots) on the left and right side of the browser window.

here comes my problem:

the width of the slider is calculated in the plug-in smoothdivscroller http://www.smoothdivscroll.com. but when i change the content of the slider via the filter navigation the total width of the slider changes, but the smoothdivscroller plug-in is not noticing it.

i set up a simplified example in jsfiddle for you and you can experience the whole problem herekuemmel-schnur.de/projekte: when all projects are shown (Alle) and you scroll to the right and then switch to the category “Lehrprojekte” you won’t see any projects because they are on the far left side and the total width of the container is not recalculated.

in order to fix this i have three ideas where i need some serious help.

1) the smoothdivscroll plug in offers a public method to recalculate the width of the container like

$("#makeMeScrollable").smoothDivScroll("recalculateScrollableArea");

which i need to fire every time after portfolio-list a is clicked. and i need to combine this with the method where the slider automatically switches to the first element of the current content

$("#makeMeScrollable").smoothDivScroll("moveToElement", "first");

2) My second idea – cause i don’t know if or how 1) works – is to check if the url changes and then fire the recalculation. the filter uses a hash to address the content. so i thought i could read out the url and every time the part directly after the hash changes i could fire the method.

3) I could bind the filterable plug-in to the smoothDivScroll plug-in with something like (beware of completely wrong code 🙂

$('#portfolio-list').filterable();
 $('#portfolio-filter a').click(function(){
        $('#makeMeScrollable').smoothDivScroll("moveToElement", "first")("recalculateScrollableArea");
});

so.. what do you think? again the jsfiddle link: jsfiddle.net/tobiasmay/QudtF/

thanks,
tobi.

ps. i would have setup the links properly, but i need 1 more reputation point to post more then 1 link 😉

  • 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-29T05:03:49+00:00Added an answer on May 29, 2026 at 5:03 am

    You can listen to the event filterportfolio, and recalculate/moveToElement from there.

    $("body").bind("filterportfolio", function()
    {
        var
            interval = 50,
            duration = 1000;
    
        var intervalId = setInterval(function()
        {
            $("#makeMeScrollable").smoothDivScroll("recalculateScrollableArea");
    
            duration -= interval;
    
            if(duration <= 0)
            {
                clearInterval(intervalId);
            }
        }, interval);
    
        $("#makeMeScrollable").smoothDivScroll("moveToElement", "first");
    });
    

    It seemed to work when playing with it in the javascript console on the live site. Add the code block to aks.js or try it out in Chrome: go to the site, open the console, paste the code and press enter. Should work right away when reproducing the steps from the question: scroll far to the right, click on a filter.

    Edit: due to the animations in the filtering, .smoothDivScroll(...) needs to be called after the animations are done. Since the animations might look a bit ugly if only called once, the recalculations will be done several times during duration milliseconds with an interval milliseconds in between.

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

Sidebar

Related Questions

Hey, i need some help with rails, again ! Last it was about Authlogic..
Hey there, I need some help with some MYSQL Joins that I really don't
Hey guys. I need to compile some project. I installed Visual C++ 6.0 +
Hey there, I am trying to get my signout button to work. This is
hey there, Im having problems displaying my results in this program but the program
hey there - I'm trying to use asp.net mvc for some things as usual,
Hey there, i got this very annoying problem: I have a CheckBoxList getting items
Hey guys, I need to make a list of some functions that are listed
Hey. I need some help with jQuery Ajax calls. In javascript I have to
Hey guys I'm working on a project in C# were I must replace any

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.