jquery-mobile

Backbone.js - 404 jQuery error on navigate

社会主义新天地 提交于 2019-12-25 07:13:53
问题 Navigation is not working as I expected, when I trigger goToTournament (see below) the current view just re-renders and I get a jQuery 404 not found error on the console. The URL is changing appropriately and the correct route method is being triggered as well. // js/views/home.js define([ 'jquery', 'jquerym', 'underscore', 'backbone', 'models/tournaments/featured', 'collections/home', 'text!/templates/home.html' ], function($, JQM, _, Backbone, FeaturedModel, HomeCollection, homeTemplate) {

Add <li> dynamically reading from a folder photoswipe purpose

本秂侑毒 提交于 2019-12-25 07:04:07
问题 Sorry for my English, I am a new to jquery mobile and only have basic knowledge about javascript languages in general; I was playing around with a single page website mobile ( I usually use Dreamweaver CS6) and I reached a good result with photoswipe and everything was good since I had just few images. I have added a lot of them so now I would get the images' link dynamically. In short, I want to start from a folder on my ftp and read all images file within it and create the <li> items for

Pageinit fires multiple times

◇◆丶佛笑我妖孽 提交于 2019-12-25 06:58:29
问题 I am developing a jQuery Mobile and PhoneGap app. I am using this code: $('#contact').live('pageinit', function() { //$.mobile.loading('show'); theme(); getData('contact/list',contactList); //$.mobile.loading('hide'); }); When accessing page for the first time, it works good. In second attempt event is firing multiple times. I tried using bind but it doesn't work. I think it is connected with live event. It is binded each time I initialize the page, which makes it multiple. Problem is solved

jQuery Mobile: Prevent node being deleted on history back

落花浮王杯 提交于 2019-12-25 06:55:29
问题 I have this code $(function() { $(window).on("swipeleft", jqmForward).on("swiperight", jqmBack); }); function jqmBack(e) { var prevpage = $('div.ui-page-active').prevAll('div[data-role="page"]'); if (prevpage.length > 0) $.mobile.changePage($(prevpage[0]), { transition: "slide", reverse: true }, true, true); } function jqmForward(e) { var nextpage = $('div.ui-page-active').nextAll('div[data-role="page"]'); if (nextpage.length > 0) $.mobile.changePage($(nextpage[0]), "slide", false, true); }

IBM Worklight 6.0.0.1 - JavaScript not executing in a jQuery Mobile multipage app

爱⌒轻易说出口 提交于 2019-12-25 06:49:06
问题 I am using IBM Worklight Studio version_6.0.0.20130926-2018. In my app I am using the jQuery Mobile framework. My problem is that when I try to load a data-role="page" using $.mobile.changePage , the page is not refreshed by itself. When I refresh this page, the JavaScript code is not working. Instead, I get the following errors: ReferenceError: WLJQ is not defined profile.html:11 TypeError: $ is undefined jquery.mobile-1.3.2.js:28 ReferenceError: $ is not defined profile.js:3 ReferenceError:

Is there an alternative to data-direction=“reverse”? (Something like a “slideleft” transition)

北慕城南 提交于 2019-12-25 06:46:06
问题 Is there an alternative to data-direction="reverse" ? Since data-direction="reverse" works fine the first time, but when I click on a link a second time (which also has a data-direction="reverse" ) it seems like JQuery Mobile is reversing the last data-transition , so its another slide to the right. Any solutions? 来源: https://stackoverflow.com/questions/8573283/is-there-an-alternative-to-data-direction-reverse-something-like-a-slidelef

How to set a value and placeholder together for input text?

回眸只為那壹抹淺笑 提交于 2019-12-25 06:37:07
问题 I need to put a hint for a text box.I know it can be done via placeholder , but I also need to set value for the same text box (The initial value should be hidden).Is there any way to that rather than some logic? This occurred while I am developing a mobile app using html5 and jquery-mobile.I am trying to build a custom hour and minute selector.Insted of html is there any option in jquery-mobile? Thank you 回答1: Set the placeholder value via the standard JQM method identified via the JQM docs.

How do I create a button to switch between mobile and desktop modes of my MVC site?

前提是你 提交于 2019-12-25 06:19:30
问题 I have a MVC site that detects what device (mobile or desktop browser) is being used and displays the appropriate views: either MySite.cshtml or MySite.Mobile.cshtml. This is working fine. I would like to be able to have a button on the site that toggles between these two modes. How can I do that? One of the things I'd like to do is make it able for a desktop user to view the mobile version. I would do this to demo this for a client. I could also see reasons a mobile user might want to see

PhoneGap check Internet connection on device vs mobile browser

落花浮王杯 提交于 2019-12-25 06:14:13
问题 I am new to Phonegap and JqueryMobile. I need to check the internet connection on device. After seeing some solution on net I got confused about approaches. some solutions is suggesting to use PG API like network manager and connection while some using JQMobile method to check connection. My question is which to prefer ? or what are the target areas for both the implementation ? 回答1: PhoneGap have own function to check Internet connection available or not.Here is that official document. Check

Uncaught ReferenceError using external script & jQuery Mobile

*爱你&永不变心* 提交于 2019-12-25 06:03:45
问题 I'm trying to create a web app but can't get my javascript to work. When loading the page with a fresh started browser I get 'Uncaught ReferenceError: getResult is not defined' (is located in js/ajax.js) but when I refresh the page everything works. I have tried to move where the script loading takes place but I can't get it to work. I found a bunch of similar questions but they seem to suggest to load script inside and to not use $(document).ready() and I am doing that already. Anyone? EDIT: