Issue with multi-page navigation using jQuery Mobile Framework in IBM Worklight [duplicate] - jquery-mobile

This question already has an answer here:
How to change between pages using Jquery Mobile in Worklight
(1 answer)
Closed 8 years ago.
I am developing a sample mobile banking app in IBM Worklight V6.2 using the jQuery Mobile Framework. I read the Getting Started Documentation on IBM Worklight and it mentions a way to implement multi-page navigation using fragments. However, it also states that if you are using a JavaScript UI Framework, use its API's instead.
I read up on the jQuery Mobile pagecontainer method and am implementing it as below:
<li>Branch Locations</li>
However, I get the issue that the linked page loads after clicking the link but the original page then reloads. Could someone explain to me why this is happening? Is this a known issue?
I found the problem. I had a link to the
<script src="jqueryMobile/jquery.mobile-1.4.3.js"></script>
In the linked pages. That is the reason it was reinitializing the original index page.

See this project for a Worklight 6.2-based app using jQuery Mobile 1.4.3's Pagecontainer widget.
In the app, you click on a button to transition from index.html to page1.html by using:
HTML
load page1
JavaScript
function changeToPage1() {
$(':mobile-pagecontainer').pagecontainer('change','page1.html');
}
You may also take a look at the following questions that are answered with explanation and project examples for using changePage.
Note that the projects may be from Worklight 6.0 and 6.1 rather than 6.2 but that does not matter as here it's about the JavaScript, simply review it.
How to change between pages using Jquery Mobile in Worklight
IBM Workligt Single HTML file containing all application pages: How to load new page?
IBM Worklight 6.1 - Why is Cordova code not working when placed in a sub-page?
IBM Worklight - Page fragmentation
IBM Worklight - Navigation errors in a multipage app
In all of them, the idea is that Worklight is a Single Page Application. Thus you cannot load another HTML file and expect the application to continue functioning. By doing so you lose the "context" of the Worklight framework - the references to the included JS files, etc.
Instead, you can use jQuery's load or jQuery Mobile's changePage (deprecated in v1.4, to be removed in v5), to load different "pages". Ample examples are provided above.

Related

which is the equal syntax "Ext.BoxComponent" in Jquery Mobile

I have to show a table in a widget based on the device(mobile, laptop, tablet) selected by user.
For Desktop/Laptop I am loading ExtJs libraries. I wrote following code which is working fine.
var container = new Ext.BoxComponent({ id: "demoBox" });
for mobile I load Jquery Mobile libraries. I am getting an error like
Uncaught Reference Error: Ext is not defined
. could you tell me which is equal component for 'Box Component' in Jquery mobile.
JQuery Mobile and ExtJS are not compatible in a way that you could copy over the code, optimize and be done with it. JQuery requires you to write HTML code, ExtJS doesn't. If you have a working ExtJS application, the best way to go mobile is ExtJS6-modern, previously called Sencha Touch.
The way you write JQuery Mobile means that you don't need a BoxComponent there. You would just write a bit of HTML/CSS - a DIV with a certain width and height - and be done with it.

jquery mobile not working with google app script

When I've linked jQuery Mobile in my HTML Frontend in Google App Script, the following error will pop up in chrome debug tool.
Could not create the property 'jQuery110204039543210528791': USELESS is not extensible. 702029031-maestro_htmlapp_bin_maestro_htmlapp.js?lib=MT0FjXL5Y7sJYLE797XdNlumjcy0VxvZE:62
jquery.mobile-1.3.2.min.js:2: Could not create the property 'jQuery110204039543210528791': USELESS is not extensible.
More looks likely the Caja in Google App Script is not supporting jQuery Mobile?
Any idears?
Caja sanitation prevents jQuery mobile markup. This is an issue addressed in the Issue Tracker.
I'm not sure how long it would take to have jQuery added to Caja's list...

Meteor + jQuery Mobile + Phonegap

How to connect jQuery Mobile (meteor add ...)? I understand that you can connect by adding the head, but I do not want to.
I know about how to use Meteor + Phonegap, however, advise which option is better?
Outdated information:
jQuery-Mobile Meteor sample integration and/or integration guidelines
I created a new jQuery mobile (jqm) demo app at jqmdemo.meteor.com
because the "old" demo app (jqm.meteor.com) wasn't working as expected.
You can create a package in your local lib folder to use jqm in meteor (see source code on bitbucket, link is on the demo page).
There's no meteorite package for this at atmosphere yet (mrt add ...). I haven't created one, because I think there are still many things that can be improved in the demo (e.g. popups are not working in the demo).
Also event binding needs to be re-checked because I added the event to the rendered function of the templates with jQuery.on(...).
Attaching the jquery mobile events to the template.[yourtemplate].events({}) handler would be better, but I don't know how to do this.
I can not say anything to phonegap at the moment. Because I haven't tested it.
But at the moment I think that jqm and meteor is a bit slow in performance. If you have a look at the fontawesome-demo inside of the jqm demo you'll notice that it takes quite long to render the >300 icons. Maybe a server side rendering would be better, but I think that's not ready in meteor.

Twitter Bootstrap for mobile

If I want to develop an web application on mobile, so should I use Twitter Bootstrap or Jquery Mobile? Twitter Bootstrap good for mobile or not?
As of version 2.0, Bootstrap is fully mobile compatible. There actually has been another question about it.
One thing you may want to keep in mind, is the purpose they're build for. jQuery mobile was created and is maintained with mobile compatibility in mind whereas Bootstrap offers it as an addition (meaning that it won't be it's main priority). If there is nothing in bootstrap that you are particularly interested in, I would go for jQuery mobile.
Depends what you want to do..
Twitter bootstrap is a CSS framework with some javascripts on it. While jquery Mobile is javascript to create native mobile feel..
So basically they are quite different..
Bootstrap 3 is built group up for mobile first, you may want to take a look at the 3.0 branch on GitHub. I didn't use jquery mobile in my app Django Market b/c I would have to change the backend and didn't want to invest. Bootstrap 3.0 IMHO will provide a lot of "competition" for other frameworks due to its power and simplicity
From my experience, i've using jQuery Mobile for a simple informative application. I spent some days on the base code, then i tested it on tablets, handsets using PhoneGap and the results wasn't good. There are still some troubles on transitions for Android and iOS devices.

Looking for jQuery mobile image slideshow compatible with PhoneGap

I'm looking for a jQuery Mobile image slideshow that is compatible with PhoneGap.
I checked out this one: http://www.photoswipe.com, but there doesn't seem to be an active community around it, e.g. the issues I registered never got answered.
I also had a look at this one: http://tympanus.net/codrops/2010/05/27/awesome-mobile-image-gallery-web-app/
But that makes use of an external XML file, and I don't want to write an XML file for each slideshow that I want to show.
Now, is there a proven image slideshow for jQuery Mobile that is compatible with PhoneGap?
You can go for http://www.photoswipe.com/ which is best one.
People have successfully used it with jQuery Mobile.
also you can Try http://swipejs.com/

Resources