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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:21:24+00:00 2026-06-03T07:21:24+00:00

I have a need to have a multi-page html, with each page containing an

  • 0

I have a need to have a multi-page html, with each page containing an identical toggle. When the user changes a toggle on one page, all the toggles on the other pages should change (or at least change on loading the other pages).

I’ve created a Fiddle to illustrate a simple scenario, with a two page example and identical toggles on each page. I’d LIKE to be able to change the toggle on page 2 by toggling the toggle on page 1
http://jsfiddle.net/vSr99/

I’ve tried a number of methods, and yes have included a refresh after attempting to manipulate with javascript, but have not even come close, no doubt due to my programatically challenged nature :-/

If anyone can suggest a simple solution I’d much appreciate it!

Thx

  • 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-06-03T07:21:25+00:00Added an answer on June 3, 2026 at 7:21 am

    try setting a global attribute when the button is clicked and store this on $(‘html’) like so:

     $('html'). attr('toggleIs',true);
    

    then you can check for this on pagebforeshow and add the toggled state to the buttons on all new pages being pulled into view depending on the button state.

    EDIT
    Here is a jsfiddle (ignore the first alert);

    Here is the html:

    $(document).on('change', '.your_select', function(){
      // set
      if( $(this).find('option:selected').val() == "on" ){
           $('html').data('toggle', 'on');
           } else {
           $('html').data('toggle', 'off');
           }
      });
    
    $(document).on('pagebeforeshow', '.ui-page', function(){
    
      var that = $(this).find('.your_select');
      // clear
      that.find('option').removeAttr('selected');
      // reset
      if($('html').data('toggle') == "on" ){
          alert("should be on")
          that.find('select option[value="on"]').attr('selected', 'selected')
          } else {
            alert("should be off")          
            that.find('option[value="off"]').attr('selected', 'selected')
            }
     // refresh slider
     ... 
     });
    

    please note:

    • took me a while to see you where using jquery 1.6.4, so my on-bindings didn’t work. If you want to keep, you need to use live for the bindings to also capture pages being pulled in.
    • I gave a class to all sliders, to set them together
    • I cannot get the JQM slider(‘refresh’) to work on the slider or any parent element… you will have to figure that out by yourself, but the synchronizing is working 🙂
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a multi-paged forms and I need to get all the data from
I have a multi-page PDF file that has information I need to parse. The
I have a multi-page ascii file, and I need to be able to separate
I need to convert a multi-page TIFF to a multi-page PDF. I have access
I have a project where I need to compare multi-chapter documents to a second
I have a Maven multi-module project and I need two different parent POMs in
I have a longer running multi-step process using BackgroundWorker and C#. I need to
I have a large table with a multi-part index. I need to run several
I have a multi-browser page that shows vertical text. As an ugly hack to
I have a friend who is need of a web page. He does interior

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.