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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:55:46+00:00 2026-05-22T19:55:46+00:00

I am using this plug in . All works well, but now i need

  • 0

I am using this plug in. All works well, but now i need to make a change.
the callback always made the last condition – else, why?

this condition for example never works. Any syntax error?

($("#amount").val(value) == 400)

script

 <script type="text/javascript" charset="utf-8">
     jQuery("#SliderSingle").slider({
         from: 400,
         to: 2000,
         step: 200,
         round: 1,
         dimension: '&nbsp;€',
         scale: ['-400€', '600€', '800€', '1000€', '1200€', '1400€', '1600€', '1800€', '+2000€'],
         callback: function(value) {
             if ($("#amount").val(value) == 400) { //not working
                 alert("nop");
                 $(html("-400 sdf"));
             }
             else if ($("#amount").val(value) == 2000) {  //not working
                 alert("nopp");
                 $(html("+2000 dfs"));
             } else {
                 $(html(value)); //always working even if the value chosen is 400 or 2000
             }
         }
     });
 </script>
  • 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-22T19:55:47+00:00Added an answer on May 22, 2026 at 7:55 pm

    Looks like you want this:

    function(value) {
        if (value == 400) {
            alert("nop");
            $(html("-400 sdf"));
        }
        else if (value == 2000) { 
            alert("nopp");
            $(html("+2000 dfs"));
        } else {
            $(html(value)); //always working even if the value chosen is 400 or 2000
        }
    }
    

    Although $(html("-400 sdf")); won’t work. Unless you’ve defined a html() function

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

Sidebar

Related Questions

i need help with this. I'am using JQuery's Dynamic Form plug-in, it duplicates my
I have scrollbars using the jScrollPane plug-in for jQuery. The scrollbar works, all content
On a portal's main page, I'm using a jQuery container plug-in, and by this
I am using the toChecklist plug-in for jQuery. Everything works fine on my development
using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
Using this to load the json var jsonParsed = JSON.parse(localStorage.getItem('test')); Using this to save
Using this page, http://developer.android.com/sdk/compatibility-library.html , I have installed the Android Support Package, added a
Using this C# application pick a start and ending date range, that SAP will
Using this tutorial: http://www.c-sharpcorner.com/uploadfile/UrmimalaPal/creating-a-windows-phone-7-application-consuming-data-using-a-wcf-service/ I have created sample/hello world application on the windows phone
Using this code, i am able to send a notification to my own device.

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.