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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:28:38+00:00 2026-05-28T03:28:38+00:00

Prior to upgrading to JQuery 1.7.1, both vertical and horizontal slider were working fine.

  • 0

Prior to upgrading to JQuery 1.7.1, both vertical and horizontal slider were working fine. Now that I have upgraded to 1.7.1, everything stops working. Below are my codes.

$("#HorizontalScrollBar").slider({
    change: HorizontalHandleChange,
    slide: HorizontalHandleSlide,
    min: 0,
    max: 100
});

$("#VerticalScrollBar").slider({    
    orientation: "vertical",
    change: VerticalHandleChange,
    slide: VerticalHandleSlide,
    min: -100,
    max: 0
}); 

The codes for horizontal slider handles

function HorizontalHandleChange(e, ui) {
    var maxScroll = $(".HorizontalScroll").attr("scrollWidth") - $(".HorizontalScroll").width();
    $(".HorizontalScroll").animate({ 
        scrollLeft: +ui.value * (maxScroll / 100)
    }, 100);    
}

function HorizontalHandleSlide(e, ui) {
    var maxScroll = $(".HorizontalScroll").attr("scrollWidth") - $(".HorizontalScroll").width();
    $(".HorizontalScroll").attr({ 
        scrollLeft: +ui.value * (maxScroll / 100)   
    });
}

and vertical slider handles

function VerticalHandleChange(e, ui) {
    var maxScroll = $(".VerticalScroll").attr("scrollHeight") - $(".VerticalScroll").height();
    $(".VerticalScroll").animate({ 
        scrollTop: -ui.value * (maxScroll / 100)
    }, 100);
}

function VerticalHandleSlide(e, ui) {
    var maxScroll = $(".VerticalScroll").attr("scrollHeight") - $(".VerticalScroll").height();
    $(".VerticalScroll").attr({ 
        scrollTop: -ui.value * (maxScroll / 100)   
    });
}

Anyway, I hope someone can find a solution for me to get my sliders working with JQuery 1.7.1. Thanks.

FYI, the sliders are used on 4 DIVs, ie. Top, MidLeft, MidRight & Bottom, where the vertical slider works on MidLeft & MidRight while the horizontal slider works on MidRight, Top and Bottom though I don’t think this might be the cause of the problem.

  • 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-28T03:28:39+00:00Added an answer on May 28, 2026 at 3:28 am

    scrollWidth and scrollHeight are properties, use the .prop method to get and set them.

    function HorizontalHandleChange(e, ui) {
        var maxScroll = $(".HorizontalScroll").prop("scrollWidth") - $(".HorizontalScroll").width();
        $(".HorizontalScroll").animate({
            scrollLeft: +ui.value * (maxScroll / 100)
        }, 100);
    }
    
    function HorizontalHandleSlide(e, ui) {
        var maxScroll = $(".HorizontalScroll").prop("scrollWidth") - $(".HorizontalScroll").width();
        $(".HorizontalScroll").attr({
            scrollLeft: +ui.value * (maxScroll / 100)
        });
    }
    
    function VerticalHandleChange(e, ui) {
        var maxScroll = $(".VerticalScroll").prop("scrollHeight") - $(".VerticalScroll").height();
        $(".VerticalScroll").animate({
            scrollTop: -ui.value * (maxScroll / 100)
        }, 100);
    }
    
    function VerticalHandleSlide(e, ui) {
        var maxScroll = $(".VerticalScroll").prop("scrollHeight") - $(".VerticalScroll").height();
        $(".VerticalScroll").attr({
            scrollTop: -ui.value * (maxScroll / 100)
        });
    }
    

    This change came from jQuery 1.6 where .attr was split into two methods, .attr and .prop where .attr works on attributes and .prop works on properties.

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

Sidebar

Related Questions

I have an existing iPhone app that was working fine in Xcode 4.0 prior
I noticed prior to posting this question that there have been similar questions posted
Please refer to my prior question here about implementing drag/drop. I got everything working
I'm working on Mac Snow Leapord Prior to installation of RVM, I have tried
The following code was working prior to upgrading to iOS 6. It works in
I use setError() on a EditText for validation. It was working fine prior to
I have no prior experience working with batch files or shell scripting in general.
Prior to C++11, if I had a function that operated on large objects, my
Introduction : I have prior experience in programming (C, C++, Java), however, this is
I have prior experience in build a automatic build process for .NET & Delphi

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.