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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:27:55+00:00 2026-05-16T12:27:55+00:00

My problem is I can’t get this jQuery slider to start from .1 to

  • 0

My problem is I can’t get this jQuery slider to start from .1 to 10 in .1 increments and end (stop) at 10. Would like to pull this off without jQuery UI or jQuery tools.

I plan to have the hidden input value updated using the slider position then a button that says “VOTE”.

I appreciate any help with this project. Thanks, Brandon.

I’m trying to limit the slider to only move inside the “slider_container” div.I can’t get the box to stop at the left and right?

<HTML>
<HEAD>
<script type="text/javascript">
<!--
$(function() {
    var sliderMouseDown = false;
    var count = 0;
    $("#slider").mousedown(function() {
        sliderMouseDown = true;
    });
    $(document).mousemove(function(evnt) {
        if (sliderMouseDown) {
            count = count + .1;
            $("#vote").html(count);
        }
    });
    $(document).mouseup(function() {
        if (sliderMouseDown)
        {
            $("#slider").focus();
            count = 0;
            sliderMouseDown = false;
        }
    });
});

var x1 = 0;
var drag = false;
$(document).ready(function(e){
$('#slider').mousedown(function(e){
e.preventDefault ();
x1 = e.pageX - parseInt($('#slider').css('left'));
drag = true;
})
$(document).mouseup(function(e){ drag = false; })
$(document).mousemove(function(e){ 
if(!drag) return
$('#slider').css('left',eval(e.pageX - x1)+'px')
})
});

//-->
</script>
<style type="text/css">
#slider_container { background: url(images/rating-slider-bg.jpg) repeat-x; width: 200px; height: 22px; background-color: #ffffff; display:block; position: relative; z-index: 1; }
#slider { background: url(images/rating-slider.jpg) no-repeat; width: 10px; height: 35px; top: -4px; position: absolute; left:0; cursor: pointer; cursor: hand; z-index: 99; }
</style>
</HEAD>
<BODY>
<br><br><br><br><br><br>

<center>
<div id="slider_container"><div id="slider"></div></div>
<div id="vote" class="vote"></div>
</center>

</BODY>
</HTML>
  • 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-16T12:27:56+00:00Added an answer on May 16, 2026 at 12:27 pm

    See What is the best method to reduce the size of my Javascript and CSS files? for some information about compressing your JavaScript files.

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

Sidebar

Related Questions

My problem is that I can't seem to get the image from my bundle
I can't seem to find a .NET answer to this problem, which I would
I can't quite figure out this syntax problem with a case expression in a
I can't seem to find an answer to this problem, and I'm wondering if
I have problem compilin this code..can anyone tell whats wrong with the syntax CREATE
Problem: How can I tell if a selection of text in the CRichEditCtrl has
I've created a custom exception for a very specific problem that can go wrong.
I have a script that constantly segfaults - the problem that I can't solve
Hopefully I can do the problem justice, because it was too difficult to summarise
How can I setup a shared ccache without falling into a permissions problem? I

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.