react router + jquery mobile page transition - jquery-mobile

I am working on single page application with ReactJS and react-router. There is also and jquery mobile. I don't want to use jquery mobile routing and I successfully disabled that feature.
My problem is that I want to have some transitions between the pages. Now I have big troubles with initializing each page with jquery mobile. Is there elegant approach of my case?
I appreciate any help.

Related

jQuery Mobile vs. smoothState.js?

If I'm already using jQuery Mobile -- is http://css-tricks.com/add-page-transitions-css-smoothstate-js/ (http://weblinc.github.io/jquery.smoothState.js/) possible / worth it to implement?
I really don't see a benefit of using jQuery Mobile with smoothState.js. jQuery Mobile already can do everything smoothState.js can, you only need to learn how. Though smoothState.js has everything better described, plus you don't need to use gazillion different page events. But to use them both you would need to turn off jQuery Mobile Ajax handling.
Basically I would like to see smoothState.js approach used inside jQuery Mobile framework.
My advice stick to jQuery mobile if you really need its UI, for everything else use smoothState.js, of course if seamless navigation is something you desire.

Creating Mobile view in Asp.net MVC using Kendo UI

I have an asp.net mvc project based on bootstrap which almost all the views are responsive. However is not possible to make it responsive for two of them. That is the reason why I make these two views with jQuery Mobile. But because of some limitation i decide to create them with Kendo UI, with jQuery mobile i create viewName.mobile.cshtml and it works fine whenever i visit my web application with mobile device and it renders appropriate view correctly.
when i start using kendo UI I figured out it is somehow different. the question is : it is possible to implement my senario with kendo UI?? or i should create kendo mobile application separately?
If it works with jQuery Mobile, it will work with Kendo to. Try using the Kendo Mobile for ASP.NET MVC here: http://www.kendoui.com/server-wrappers/mvc/mobile.aspx

jQuery Mobile vs AngularJs page navigation

I am developing a hybrid mobile app using jQuery Mobile and AngularJS.
I decided to use a mix of the two for the following:
jQuery Mobile
good UI features
not too heavyweight (compared to Sencha Touch, for example)
AngularJS
good performance and resource management (caching, asynchronous requests)
personal experience
I have little to no experience with jQuery Mobile and, as I was learning, I noticed a potential conflict between the page navigation models of the two.
Should I use only one ?
If yes, which one is better suited for my needs ?
Are there any gotchas with this setup ?
Many thanks.
You can't compare them to each other.
Angular.js (like Backbone, Ember eg.) are MV* Frameworks (for SPA) which used to render html templates/views directly in the client instead of server. So you have a lot of application logic now in your frontend and this Frameworks are made to make your life better, coding this.
jQuery Mobile on the other side is a pure widget/plugin library. The AJAX navigation plugin load pages (something static, like html) into the DOM via AJAX. So you have to pre-render this pages on the server somehow.
If you started to build a SPA with Angular it doesn't make sense to use jQuery Mobile's AJAX navigation at all. (If it's a native mobile app you have no server anyway.)
Sure, you won't get far without an UI component library so use one of your choice (eg. jQM) but work with Angular's directives to init the plugins/widgets correctly on your DOM elements since a $(document).ready(...) or a $(document).on( "pageload", ... ) doesn't know anything about your Angular views.
Take a look at following projects:
http://angular-ui.github.io
https://github.com/angular-widgets/angular-jqm
This has been already addressed in HERE
Basically the article states that trying to intercept the navigation from angular can be painful, so leave all the routing jqm

jQueryMobile Data Binding options

I was going through some basic tutorial on jQueryMobile and would like to know -
what are the different databinding options available for jQueryMobile?
I searched and as a result found only knockoutjs -
Is it the only way to go or can I bind the controls like we generally do for normal html controls?
Essentially, I want to use jQueryMobile with MVC 4 and bind the controls with JSON.
Please guide.
You should be able to treat a jquery mobile site built with MVC just as you do any other MVC application. You may run into issues with jqm based ajax navigation but that can be turned off with data-ajax="false".
http://jquerymobile.com/test/docs/forms/forms-sample.html
You can also make this change globally: "jQuery Mobile will automatically handle link clicks and form submissions through Ajax, when possible. If false, URL hash listening will be disabled as well, and URLs will load as ordinary HTTP requests."
$(document).bind("mobileinit", function(){
$.mobile.ajaxEnabled = false;
});
http://jquerymobile.com/test/docs/api/globalconfig.html
In the end, ajax based navigation is about performance. If you want to go with generic asp.net MVC, you will have to weigh these trade offs.

Dynamic content areas with JQuery-Mobile and Ruby on Rails

Working with Jquery-Mobile 1.0 Final and Ruby on Rails 3.2.0.rc2: I am attempting to set up a persistant sidebar existing in views/layouts/application.html.haml where accessing any other link within the site the content will be dynamically loaded in a designated content area and the sidebar remains persistant.
The issue I am running into is JQuery-Mobile already taking care of the Ajax and then producing animation for the entirety of the page. I don't have a firm understanding of the flow of a page transition in JQuery-Mobile, aside for the doc on their homepage is there another resource which may better educate me about this process?
How does making the class of a div ui-state-persistant affect how JQuery-Mobile is handling a new page access?
What is the best way to set up a persistant sidebar building on JQuery-Mobile?
Take a look at this experimental project for a split-view for jquery mobile. It looks like they are doing something that may help.
http://asyraf9.github.com/jquery-mobile/

Resources