How safe is it to use jQuery 2.0 beta with the latest jQuery Mobile 1.3? - jquery-mobile

I'm exploring jQuery Mobile so what I'm doing is not anywhere near production.
Q: Is it ok to use jQuery 2.0 with jQuery Mobile or should I just stick with 1.8.2 like they say to do on the download page?

From my experience it is safe. I am using jQuery 2.0.0b1 with jQuery Mobile 1.3 and currently I didn't find a problem.
Basically 2.0 is 1.9 but without support for IE 6 and 7. And lets be honest you don't need them for jQuery Mobile. And 1.9 is only a cleaner, slimmer, modern-API upgrade from jQuery 1.8.
On the other hand, like Omar told you in his comment, stick to jQ 1.8.3. Higher version will not provide you with faster or better code execution. They will only learn you to abandon all that deprecated code like bind, live, delegate .... and so on.
EDIT :
I forgot, if you want to use version 2.0 you will need to learn to bind your events with a function on. This is very important because 90 % of jQuery Mobile examples use live or bind for event binding.

Related

Orbeon 4.7 $.browser is undefined

I have upgraded my application from orbeon 4.4 to orbeon 4.7. On loading forms, in the browser console I'm getting $.browser is undefined.
On debugging I found that orbeon 4.7 is using jQuery v1.11.0 and $.browser is removed from jQuery v1.9.
Any idea why it is still using removed/deprecated $.browser??
How to solve this??
Per the jQuery documentation, "This property was removed in jQuery 1.9 and is available only through the jQuery.migrate plugin. Please try to use feature detection instead.". So you could:
Add the JavaScript for jquery-migrate to your project.
Change your code to check whether the feature you want to use is available, rather than rely on knowing in which browser it is available. (Most front-end developers would recommend you try to use this first.)

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.

What JavaScript framework do you use with trigger.io? (backbone, knockout, ember, angular)

What JavaScript framework do you use successfully with Trigger.io? I mean client side JS app frameworks like backbone, knockout, ember, angular?
We use angular.js here but have some significant problems when using router for our app ... see details here https://groups.google.com/forum/?fromgroups#!topic/angular/XGDRAskA8qs .
Trigger.io and using angular.js router doesnt work together.(at least we could not get it to work)
Do you use some other JS framework you can recommend as working fine with trigger.io using application router capability? (I could see similar router feature in ember or backbone for example)
Although we don't endorse one particular library, and our goal is to be compatible with them all, I normally reach for Backbone first when starting a Trigger app. It's simple, lightweight but powerful and has a bunch of nice extensions.
Apart from the issues with Angular which we aim to have fixed as part of our next major release (probably end of July '12), we've not had reports of any snags with other libraries apart from Amber Smalltalk, which should be fixed in the same release.
We have demo apps using Backbone and Sencha here and here, and our initial demo app is written using jQuery Mobile.
I'm using jQuery, Backbonejs, Handlebars, Coffeescript, LESS as my framework - they are pretty much all from my Web development effort. Didn't have to change too much.
In fact, so far, I'm finding I have to simplify a LOT of things to get it down to a level where it fits the mobile environment.
Angular JS is one of the best contenders out there as far as JavaScript Frameworks. I ran all the way through the Angular tutorial, created a new Trigger app, and dropped in the tutorial app in place of the default scaffolding.
RAN NO PROBLEM WHAT SO EVER!!! IOS, Android, and WEB
Interestingly enough, I adapted the Angular tutorial with my own data from a server. Even works using XHR requests, and Cross Origin Resource Sharing.
In my opinion, build your app using Angular.JS + Zepto/Jquery.
Use either of those frameworks to add CSS Transitions to your app for your UI.
The reason I recommend making your own UI rather than using something like JQuery Mobile, or Sencha Touch 2 is for the past 3 days I have been doing extensive research and testing on numerouse JS Mobile UI Frameworks, and JQmobi is the only one that came close to being fast but it didnt look vary nice.
Making your own will reduce size of the app, give you full control, and keep the app running smooth..your using will never know its not native ;P

Does PhoneGap require JQM or is that a coincidence?

The PhoneGap examples that I'm seeing use jQuery Mobile, but I'm wondering if PhoneGap requires it, or if people are using JQM because they're (obviously) writing a mobile app?
In fact, does PhoneGap require jQuery at all?
Let me Google that for you:
http://wiki.phonegap.com/w/page/16494778/Getting%20Started%20with%20PhoneGap%20(iOS)%20-%20Xcode%203#Requirements
That is for iOS but no PhoneGap does not require jQuery.
People are most likely using jQuery mobile since they are trying to target multiple devices and JQM supports that fairly well out of the box.
http://wiki.phonegap.com/w/page/36868306/UI%20Development%20using%20jQueryMobile
Phonegap does not require jQuery at all.
It's basically just an empty browser window without all the fluff. You can use whatever HTML, CSS, and Javascript tricks you want as long as they're compatible with an HTML5 capable browser.
I like http://zeptojs.com/ for handling the javascript. Much more lightweight (although you lose a lot of the animations and stuff that JQuery has)

Is there a dojo or a Jquery just for Firefox add on development?

Started working on Firefox add ons, which is done with JavaScript and XUL, and I find myself sorely wanting to use Dojo or someother kind of JavaScript like library, but I can't find one that exists. So I was thinking of starting a library by porting Dojo over to a Firefox add on specific fork. Get rid off the cross browser stuff, use array comprehension and other nice stuff available in Firefox's JavaScript engine. I worry about whether or not there's enough of a userbase who'd take advantage of this, but more than that I guess I'm wondering if there's already something like this? Google finds nothing.
Mozilla Corp developed a JavaScript library for this purpose: FUEL.
it is developed by John Resig the creator of jQuery.
To know how to use jQuery inside FF extension look at this similar question
jQuery, at least, functions perfectly well when embedded in a Firefox addon. I can't quote you names, but I've heard that several popular addons are already using jQuery.
Here's an article discussing using jQuery within XUL and some of the hoops you may need to jump through.
It is fairly common to embed jQuery in firefox extensions.

Resources