jquery-mobile

Jquery Mobile problem with AJAX updates

半城伤御伤魂 提交于 2019-12-12 12:26:18
问题 I'm having a very weird problem with radio buttons in JQuery Mobile. I'm populating some radiobuttons with ajax. When I do it the first time it's ok, but any subsequent loads seem to cause problems with the display - each checkbox is displayed separately rather than on a single list. function getWords() { var gig_id = $('#gigs').val(); $.ajax({ url: Nnn.serverLocation+'/words?gigid='+ gig_id, success: function(data) { Nnn.words = eval('(' + data + ')'); displayWords(); } }); } function

What's the fastest way to load a large nested list in jQuery Mobile?

佐手、 提交于 2019-12-12 12:17:23
问题 I have a large nested array that I'm generating from parsing a CSV file in PHP. I had it output it in JSON and had my jQuery Mobile site fetch it, then parse it into a DOM list <ul> , <li> . This worked fine on my desktop browser but seemed to take forever on my mobile devices. So then I had the PHP script actually output the HTML, and pasted that in my jQuery Mobile site to see if that sped it up. This essentially removed the fetching of any data. The index.html simply has a very large

Cannot find a responsive size for a container of width=0px and data-ad-format=auto adsense

£可爱£侵袭症+ 提交于 2019-12-12 12:12:30
问题 I'm trying to add an adsense responsive ad in a mobile site but I'm receiving the following error: Cannot find a responsive size for a container of width=0px and data-ad-format=auto The site is a mobile site built using JQuery Mobile 1.3. I set a width to the banner div container. I want to add the banner inside a ul: <li> <div style="width: 100%">[Banner]</div> </li> I added a similar banner into another view and it works perfectly. Has someone had this problem? Thanks. [EDIT] Well, if

Save contact number to mobile phone

僤鯓⒐⒋嵵緔 提交于 2019-12-12 12:10:51
问题 I am working on a mobile website, and I am suppose to add contact number of my client to user's mobile phone (obviously on click of a button), I was wondering if this is possible using jQuery, JS, Jquery Mobile or HTML 5, like by using <a href="tel:111222333">Call</a> we can bring up cell phone dialer etc, thanks in advance 回答1: You just can't store directly contact on the phone using js or html5 stuff. What you can try is creating a vcf card server side and redirect the client to download

jQuery Mobile swipe event

杀马特。学长 韩版系。学妹 提交于 2019-12-12 12:07:05
问题 I have a <div> tag and when user swipes over it then it logs swipe . There are three swipes i.e. swipe , swipeleft and swiperight in jQuery Mobile but I want to use swipe only. What I want to find out is when user swipe over <div> tag then log either swipeleft or swiperight based on user's swipe direction. Is it possible? If yes then how? $('.image').on('swipe', function (e) { console.log('swipe); }); 回答1: To log a swipe left use $('.image').on('swipeleft', function (e) { console.log(

Binding click event in jquery coffeescript

吃可爱长大的小学妹 提交于 2019-12-12 11:13:16
问题 I am working on rails 3.2 and using coffeescript too.. I have a doubt in using jquery mobile inside my application I have a html like <a href="#" data-item=12 data-status=true class="follow"> <span class="ui-btn-inner"> <span class="ui-btn-text"> Follow </span> </span> </a> In my coffeescript, i am trying to write function on click of this Follow, i am trying to send a ajax call. when i wrote like $("a.follow").unbind('click').bind 'click', (event, data) -> event.stopPropagation() clickedEl =

jQuery Mobile bind events

旧城冷巷雨未停 提交于 2019-12-12 11:13:01
问题 I have a little problem with jquery mobile. always my page is called this function runs. $(document).bind('pagechange', function () { // peforms ajax operations }) The problem is that each time my page is viewed it increases the times my ajax is called... example: if the page is viewed 5 times, next time will peform the same ajax request 6 times. I'm using asp.Net MVC 4. Full code: @{ //ViewBag.Title = "Consulta"; Layout = "~/Views/Shared/_LayoutMenu.cshtml"; } <div class="ui-body ui-body-b"

jQuery Mobile breaks links. What is the correct use?

空扰寡人 提交于 2019-12-12 11:12:27
问题 I added jQuery Mobile to my project because I want swipe events to trigger Bootstrap carousel scrolls. After coding with it for a day or so I noticed that internal links no longer work. I can reproduce this reliably with the following two pages, test1.html: <html> <head></head> <body> <a href="test2.html">Another page</a> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquerymobile/1.4.2/jquery.mobile

Using tap events with Twitter Bootstrap

天涯浪子 提交于 2019-12-12 10:49:41
问题 I am using twitter-bootstrap to develop a web application that can render on multiple devices. Now I would like to handle the 'tap' event. So my question here is: Can I handle the 'tap' event using jquery 1.7.2 without using jqueryMobile ? If the answer to the above question is a no, then how do I integrate jqueryMobile with twitter-bootstrap. Cause I tried including the jQueryMobile js in my twitter-bootstrap page and when I use it, the page breaks !! 回答1: The tap event is a jQuery Mobile

JQuery Mobile transition stops working on long page

筅森魡賤 提交于 2019-12-12 10:43:34
问题 I am having an issue with page transitions no longer occuring when run from the bottom of a long page. Here is a jsfiddle: http://jsfiddle.net/7WVHA/7/ If you open up the example and click on the black navigation button the transition runs as expected. However if you return to the long page, scroll to the bottom and run it again the transition no longer occurs and the second page just appears straight away. Any help would be greatly appreciated. <div data-role="page" id="long"> <div data-role