jquery-mobile

Uncaught TypeError: Cannot set property 'mobile' of undefined

非 Y 不嫁゛ 提交于 2019-12-13 11:39:44
问题 I am developing an app with angular js and phonegap. I am using jquery mobile in a directive, it is for adding some animation to a notification bar. I t works well with jquery 1.8.1 but when I use jquery mobile <script src="scripts/vendor/jquery/jquery.mobile-1.3.1.js"></script> I get the following error: Uncaught TypeError: Cannot set property 'mobile' of undefined jquery.mobile-1.3.1.js:26 (anonymous function) jquery.mobile-1.3.1.js:26 (anonymous function) jquery.mobile-1.3.1.js:27

How set end day based on start day in jQuery Mobile date picker?

▼魔方 西西 提交于 2019-12-13 11:10:10
问题 I use jQuery-Mobile-DateBox for date and time picker in jQueryMobile. <input id="start" type="date" data-role="datebox" data-options='{"mode": "calbox", "afterToday": true, "useFocus": true, "overrideDateFormat": "%m/%d/%Y"}'> <input id="end" type="date" data-role="datebox" data-options='{"mode": "calbox", "afterToday": true, "useFocus": true, "overrideDateFormat": "%m/%d/%Y"}'> I need not to allow user to select end day that are before start day. $("#end").datebox("minDays", $("#start").val(

jQuery on second click doesn't work - mobile

房东的猫 提交于 2019-12-13 10:05:19
问题 Before you say that is duplicate from other topics, I've seen that topics, such as: jQuery: trigger click() doesn't work? jQuery .on Click second time not working Jquery Onclick not happening second time one Jquery is not working on the second click And none of that help me. My code is very simple: index.php /* in body tag */ <input type="button" id="page-add" value="Add" data-role="none"/> /* after body tag */ $(function(){ $("#page-add").click(function(e){ window.location.href = 'add.php';

How to Iterate Map that contain list in the jquery function

孤者浪人 提交于 2019-12-13 09:45:56
问题 Please help me how to iterate the following in jquery . var data={100=[submenu 4, submenu 5, submenu 6], 120=[submenu 10, submenu 11, submenu 12], 125=[submenu 19, submenu 20, submenu 21], 99=[submenu 16, submenu 17, submenu 18], 77=[submenu 13, submenu 14, submenu 15], 70=[submenu 1, submenu 2, submenu 3], 44=[submenu 7, submenu 8, submenu 9]}; I want to iterate the above one based on the ids.....100,120,125............ 回答1: First, check if your data object is correct: var data = { "100" : [

JQuery mobile swipe event on Android emulator works only sometimes (using PhoneGap)

时光毁灭记忆、已成空白 提交于 2019-12-13 08:47:50
问题 I added swipeleft and swiperight listeners this way $("#slides li").swipeleft(function(){ console.log("!!!! swipe left"); }); $("#slides li").swiperight(function(){ console.log("!!!! swipe right"); }); And it works sometimes, but mostly not. I'm not doing anything different. I'm using PhoneGap 1.4.0, JQuery mobile 1.0 and JQuery min 1.7.1. Any ideas...? Thanks in advance. 回答1: Mobile browsers generally have problems with the id attribute, due to how their caching works. This means that the id

open pdf using jquery mobile

风流意气都作罢 提交于 2019-12-13 08:16:04
问题 How to open a PDF using jQuery mobile. I'm using worklight 6.o and the adapter returns the content of PDF, var content = 'some PDF content' -- which i will get from the apadapter contentType = 'PDF' -- which i will get from the adapter. I have content and contentType, based on this, I need to open the PDF, if the contentType is PDF or word,if the contentType is msword. function onSuccessDownloadAdapter (results) { try { if(results.invocationResult.isSuccessful){ if(results.invocationResult

How to change a specific JQuery Mobile button icon with javascript

空扰寡人 提交于 2019-12-13 07:48:55
问题 I have previoulsy asked a similar question of howto change a button icon, which was answered here How to change a JQuery Mobile button icon with javascript While this indeed helped me change the icons, it changed the icons of ALL the buttons in my project. What I'm asking for now is how to isolate the icon changes to a single button As example, if I have two buttons on my page; <a href="#language1" id="language4" data-rel="popup" data-role="button" data-icon="edit" data-inline="true" data

jQuery mobile - Panels with multiple internal pages

拜拜、爱过 提交于 2019-12-13 07:41:53
问题 I want to be able to use a sliding panel, and when the user selects an option from within the sliding panel, it to load a new page found internally within same html file. So far, I have this: <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css"> <script src="http://code.jquery.com/jquery-1.11.2.min.js"></script> <script src="http://code.jquery.com/mobile

Using jQuery mobile button to run javascript

安稳与你 提交于 2019-12-13 07:19:54
问题 Using a script that reference jQuery Mobile I have the following line: <a href="#" id="buttonAnswer1" data-role="button" data-inline="true" >check</a> How would I add a listener for when this button is clicked and lets say call the hello() function? i.e. <a href="#" id="buttonAnswer1" data-role="button" data-inline="true">check</a> <script> function hello(){ console.log("hello world"); } </script> 回答1: This isn't really any different then regular jQuery, that is you can use .on to bind an

Use different library instead of jQuery Mobile for <select>

不问归期 提交于 2019-12-13 07:19:35
问题 I've looked all over the place to try and find a way to somehow disable jQuery Mobile's selectmenu widget so that I can use a 3rd party library for a <select></select> . In my case, I want to use the Chosen library. Is there any way I can do this, while still retaining the rest of the jQuery Mobile styling on my page? 回答1: You can tell jQM to ignore the select by adding data-role="none" <select id="mySelect" data-role="none" placeholder="Select an option..." > <option value="">Select an