jQuery Mobile checkbox refresh slow - jquery-mobile

I am trying to refresh 500+ checkboxes with jQuery Mobile, on desktop performance is alright but on mobile its really slow.
Checkboxes are being generated dynamically through AJAX. If I don't refresh them performance is fine.
I am using
$(".selector").checkboxradio().checkboxradio("refresh");
Any idea how to optimize it so it runs faster?
Thanks.

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.

jQuery mobile prefetch data-icon

I have many different pages in jquery mobile which utilizing different data-icon, some custom and some are built in, is there a way to preload all of these data-icons, because now its like when a new page loads with a new icon for the first time, it will be blank for a second before it is loaded. which is annoying.
I am using phonegap+backbone+jquery mobile. so its heavy java stuff instead of pure html.
Have you thought about using image sprites? This way, all icons will be cached on the first page load. It's a little extra css upfront, but I think it'd be really worth it!

jQuery Mobile with Marionette or Chaplin?

I've written several web-based applications using Backbone in the past, but now I'm starting a new mobile application with Backbone.js and jQuery Mobile. I'm looking at using Marionette or Chaplin to help provide better structure, view management and memory management. Eventually this will be wrapped up using PhoneGap to be deployed an an enterprise app.
However, I cannot seem to find anything that would indicate either of these work well (or don't work) with jQuery Mobile. To get the most benefits from them, I know I'll have to disable jQuery Mobile's, which is fine. I've also seen some questions with issues about require.js and JQM not working well together either. So does anyone know if it's easy to use either of these Backbone frameworks to develop mobile site in a way that will play nicely with JQM? Or have another Backbone based framework that is designed specifically for use with JQM?
The best Backbone + JQM tutorial that I know of is http://coenraets.org/blog/2012/03/using-backbone-js-with-jquery-mobile/
Marionette should work fine - though it will be rather slow at the moment. I've run Marionette based web apps on my phone's browser and it runs... but I am also aware that it ran slowly. I'm working on performance improvements for the next release (v0.9) but that may be another week or two away, depending on how much time I have before my next contract starts.

Any Mobile Framework without jQuery or Javascript

jQuery Mobile is working for my site but slow. Cause of the slowness turned out to be jquery. We searched an alternative but most of them still uses javascript/jquery.
Question: Is there any other framework for mobile with better performance?
Considering Javascript is the core language all web browsers use for programatic changes, unless you want to only change the Visuals via CSS and what it has to offer, I believe you are stuck.
Take a look at Zepto: https://github.com/madrobby/zepto
It still uses JavaScript but with a really small footprint.

asp.net mvc: handling no-javascript

I'm working on a asp.net mvc2 app. I have been using jquery to do various different things in all of my views. They are work from a regular browser quite well. But I'm trying to figure out a good way to get the functionality working with browsers with javascript disabled (like mobile browsers). Is there a way to define a whole different view for non javascript browsers?
A specific example of what I'm trying to do is, I have a <button> with it's onClick calling a javascript that does $.post() to a controller.
What's a good way to make it, so, it works the way it works right now (doing ajax calls) with regular javascript-enabled browsers and it a also works with javascript-incapable browsers, doing a full postback ?
Thanks
I use the unobtrusive javascript approach; get the app working without JavaScript, then add in extensibility with JQuery so that the app will work when scripts are turned off, or if the JS fails to download.
Same approach I believe that #James Kolpack is talking about. This is the true failsafe approach. While you can detect the support of JS by the browser through Request.Browser, this isn't accurate to most of the possible scenarios.

Resources