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

  • Home
  • SEARCH
  • 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 8509465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:26:31+00:00 2026-06-11T03:26:31+00:00

I have a jquerymobile code for changing the pages with swipe function. My mobile.changePage

  • 0

I have a jquerymobile code for changing the pages with swipe function. My mobile.changePage looks lik this:

$.mobile.changePage(“#page”+window.now, {transition:
“slide”}, false, true);

I am also using localStorage to store settings. I have loaded them to variable transitionSettings:

function loadSettings(){
var transitionSettings = window.localStorage.getItem(“transitionsSettings”);}

The transitionsSettings variable can be ‘slide’ or ‘none’.

I want to insert this string to my mobile.changePage so it would load settings and set the right transition.

I have tried {transition: transitionSettings} and also {transition: +transitionSettings} but it didn’t work. However, my loadSettings() function is in a .js file called settings.js and my mobile.changePage() is in slide.js and both of them are imported to index.html

I think slide.js should access settings.js variables with no problem. But this is not working and the whole swipe functionality is broken by this.

Any suggestions on how to import settings variable to transition?

  • 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-11T03:26:32+00:00Added an answer on June 11, 2026 at 3:26 am

    You just need to store the transitionSettings variable in a global variable that can be accessed anywhere in your code, you can achieve a global var in javascript by attaching any var to the window object, so in your example, you could change loadSettings() function to this:

    function loadSettings(){ var window.transitionSettings = window.localStorage.getItem("transitionsSettings");}
    

    and use it in slide.js like so:

    $.mobile.changePage("#page"+window.now, {transition: window.transitionSettings}, false, true);
    

    that should work fine..

    Also you could probably just get your setting right from slide.js, like so:

    $.mobile.changePage("#page"+window.now, {transition: window.localStorage.getItem("transitionsSettings")}, false, true);
    

    That should also work fine..

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

Sidebar

Related Questions

right now i have this code using phonegap and jquerymobile $( '#user_detail' ).live( 'pageinit',function(event)
I have the following code for a jquery mobile page. When I run it
I am using jquery Mobile 1.0. I have this html code. <label for=slider class=ui-hidden-accessible>
Guys I have this peace of code I'm using phonegap with jqueryMobile to develop
I have a JQuery Mobile Multi-Page layout and I want to trigger a function
I have a jquery mobile page that uses the following code to hide a
I have the following piece of code that generate a jquerymobile-style button <a href=#
I have a code in jquery mobile that will add buttons dynamically in a
i have some code using jquery mobile + phonegap and run it on my
I have a form in a Code Igniter view in my jQuery Mobile application.

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.