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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:47:28+00:00 2026-05-23T21:47:28+00:00

I’ve got a page with 2 jQuery Mobile sliders, and functions on the .change()

  • 0

I’ve got a page with 2 jQuery Mobile sliders, and functions on the .change() events for both slider.

I need to establish a relationship between the 2 sliders, such that if I slide the 1st slider, it changes the max of the 2nd slider.

Problem is that if I do this in the change event of the 1st slider: e.g:
$('#durationSlider').max("10"); // Change the max of the 2nd slider

$('#durationSlider').slider("refresh"); // Visually update the 2nd slider

Then this obviously triggers the change event of 2nd slider and it cause recursive code.

Is there any way to pass a flag or data to indicate if the change event came from a user slide or from a manual .slider(“refresh”) function call?

  • 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-23T21:47:29+00:00Added an answer on May 23, 2026 at 9:47 pm

    What you can do to check if an evt is “manual” or “computer” generated is to check the originalEvent in the change function.

     change: function(evt, ui){
               if (evt.originalEvent === undefined){
                  //not human
                }else{
                 //human
                 }
    

    Look at this fiddle fro an example http://jsfiddle.net/nicolapeluchetti/82B4m/

    code of the fiddle (just in case jsfiddle is down):

    <button id='b'>Click me</button>
    
    <button id='c'>Click the other</button>
    
    $('#b').click(function(e) {
        if (e.originalEvent === undefined) {
            alert('not human');
        } else {
            alert('human');
        }
    
    });
    
    $('#c').click(function(e) {
        $('#b').click();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a jquery bug and I've been looking for hours now, I can't
Basically, what I'm trying to create is a page of div tags, each has
I've got a string that has curly quotes in it. I'd like to replace
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but
i got an object with contents of html markup in it, for example: string

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.