Regex Trouble
Hello, Could someone tell me what going wrong with this code? $("#P_Profil").on("change", "#Inp_Taille", function () { G_Taille = parseInt($("#Inp_Taille").val()); var regT = new RegExp("^[1-2]{1}(\d){0,2}$|^[1-2]{1}[,.](\d){2}$"); var ResultTestT = regT.test(G_Taille); if (ResultTestT) { console.log("On y passe"); flgT = true; CalculIMC(); CalculPoidsIdeal(); $("#Inp_Taille").css("background-color", "rgba(255, 255, 255, 0.0)"); } else
jquery
Hi, Im a mobile application developer. Im using Apache Cordova/Phonegap technology. I have been using Multi-html files in my project. To redirect from one html file to another we have used window.location.href. But this creates alot of issues like flickering a grey screen is appeared. I want to make it into a smooth slide transition page between. I have tried with $.mobile.changePage("index.html",{transition:"slide"}); does not work between two different html files. Does not load the ajax functions.
insert dynamic json data as new page with listview
i have an old test webapp with jquery mobile 1.2 which i now want to bring to jquery mobile 1.4.x in the past i have patched jquerymobile.js and i now want to do it the "right" way. what i want to achieve: i have a multi-page setup. a few pages are accessable via link on an external html-file. some other links will do a database query (via script on the webserver), the result is json. i now want to create a page out of this json. i have used jquery.tmpl.min.js to convert the json to html listview.
In JQM 1.4.5 and SPM what is the best event idiom for updating the page / adding handlers?
I *think* I understand the event flow, but I am curious what people think is the best way to perform operations on the page being loaded in "Single Page Mode" (SPM) ? In general I am not caching pages, so I assume I could do it using "pagecreate". But "pagecontainerchange" seems like a way to ensure thnigs get updated even when pressing "back". Basically, just before a page the user is moving to is displayed, common actions to perform include: adding event handlers (tap, click) updating content
Removing the last visible item in a list from the press of a button on a previous page.
Hi, I have two pages. On the first page I have a link to the second and a button. On the second page is a list that has four items, item1, item2, item3 and item4. What I want to do is when the button is press on the first page that it hides the last visible list view item on the second page. So on the first press it hides item4, then item3 and so on. I have included a fiddle - https://jsfiddle.net/a4poster/j8w5qwta/48/. Thanks in advance.
Recommended method for handling reload in multi-html file sites
I am developing a site using jQuery Mobile (1.4.5) and decided to use the multiple html page approach for a variety of reasons. I am sure I am not the first person to do this, but I have not found a solid recommendation on the best way to deal the "location" header and users doing a reload of some non-primary page in the site. I assume the best approach has something to do with capturing events and masking the URL in the location but... Any recommendations?
JQuery Mobile
Good evening, i recently built a JQuery divert page from the index.html page when the user is on a mobile / tablet etc. Everything was okay, but suddenly the last pages, Shop, Photos and More do not connect when touched on my mobile. I thought this maybe a Phone update, but I tested this concern on a Android and the same issue happens. The page link is... www.soultrainradio.co.uk/bootstrap/mobile.html Kind regards Gary
Sorting items in a list - in need of help.
I have a list that this time has seven rows. On some you will see "EXC" next to them (see fiddle). What I would like to do is sort these so from the bottom they fill the required rows - in this case it would be the last three - but depending on the settings it could be more or it could be less. https://jsfiddle.net/a4poster/ysyxvtyp/322/ Thanks in advance.
$(":mobile-pagecontainer").pagecontainer() not working as expected
HI I have an HTML page with two JQM pages <div data-role="page" id="page1"> . . . </div> ...and <div data- role="page"id="page2"> . . .</div> From "page1" I have an <a> link to page 2 and it works fine href="#page2" I also have a <button> with a onclick() function which calls the pagecontainer change method, page 2 shows briefly then page1 returns Why does page 2 show permanently ? Any help would be useful Thanks Nigel
opened slide in panel
Hello guys ive downloaded this http://jquerymobile.com/ I am using this demo http://demos.jquerymobile.com/1.4.2/panel-fixed/ I would like to have the panel first opened and then if someone wants to close it. How can i achieve that? Thank you!
screen.orientation not working
Hi, I am trying to use https://github.com/apache/cordova-plugin-screen-orientation in my app but it's not working and no error.. I tried: screen.orientation.unlock(); screen.orientation.lock('landscape'); but: alert("Orientation type is " + screen.orientation.type); is working and showing the orientation type so it's installed succesfully but then why it's not changing the orientation of the device? Thanks, Jassim
Retrieve record to be edited
Hello: So I had a function which builds a table in HTML for display on my html document. I wanted to take advantage of jQuery ListView, so I changed it from table to listview. This is the function: function fnShowClassesTable(data) { var str = "<ul data-role='listview' data-inset='true'>"; str += "<li data-role='list-divider' role='heading'>My Active Programs</li>" for(var i = 0; i < data.length; i++) { str += "<li class='btnEditProg'><a href='#' data-transition='slide'><h3>" + data[i].doc._id
How to still active multi tabs in same page?
I have 2 tabs in a page same as http://demos.jquerymobile.com/1.4.2/tabs/ . Firstly, I select a menu from first tabs ("Use navbar for tabs" in demo) its class and color change to active. But,When I select a menu from second tabs ("Use inset listview for tabs" in demo) , Active menu that I selected from first tab change to inactive. So, Can I make it independently active between multi tab ? Thanks. P.S. i used jquery.mobile-1.4.5
Find and return the position in a list by data-attribute.
Hi, is it possible to search through a list and return the place in the list is resides; For example: https://jsfiddle.net/ysyxvtyp/279/ Search through the resultsBox list and look for the data-color="blue" if it exists return the eq() where it resides - in this case it would be 2. Thanks.
Is there a way to trigger the language set on device?
Hello, I'm starting an application in three languages, but I would like to know how I could trigger the language used on the device of the user. Is there a simple way to do it with JQM ? Thanks in advance
Opposite to $("#resultsBox *:hidden").size();
Hi, what would be the opposite to: var a1 = $("#resultsBox *:hidden").size(); I have tried doing the opposite, substituing var a1 = $("#resultsBox *:visible").size(); Thanks in advance. Thanks.
Filterable inside custom select Fixed
I am trying to "fix" the filter box on a custom select to the top of the screen when scrolling up the list. I have very long lists and when the user edits a record the value selected can be way down the list. I need the search box to remain at the top so it is available to the user. I have tried using libraries like Sticky-Headers, but they do not seem to work. Is there a native way to make the filter box stick? Thanks, Darren
Call function when app page loads
Hello: I am developing a mobile app using Cordova, but right now I'm simply working on the HTML, JS, and CSS files. When the app opens, it will first just come to my "home" section. I have a button that will open the left Panel, and from there, if I click the "Programs" item, then it will fire my function which displays my listview (it does this in this HTML page at the "<div id="divShow"></div>") . Here is my home section: <section data-role="page" id="home"> <aside data-role="panel" data-display="overlay"
Onboarding/welcome screen using page div?
For many apps, on the first launch, it will show a screen welcoming the user or introducing the app's features. If this is not the first run, the just go straight to the main screen. Do we create 2 div with data-role="page", for example "main" and "welcome"? Then use $.mobile.navigate(page_id) to direct to the right page? Where would be the appropriate place to insert the JavaScript codes to check and direct to the right screen page automatically? By default, jQM will jump to the first data-role
Vertical scroll in div for fluid layouts
Here goes: I want to have a vertical scroll in a div for images and text on the tablet and desktop but not for mobile phones. This is my first responsive website... first question to a forum... excuse my ignorance. I've read up on how to make the scroll thingy happen but haven't found how to have it not happen for screens less than. If it's a bit of query/CSS stuff what is it and where do I put it?
Changing background of listview / Split buttons
Hi, I'm using following code to generate a listview (server side): <div data-role="page" data-quicklinks="true" id="index"> <div data-role="header"> <h1> Tivo Remote </h1> <div data-role="ui-content"> <ul data-role="listview" data-split-icon="arrow-r" data-split-theme="a" data-filter="true" data-filter-placeholder="Sök program"> <li> <a href="index.php?channel=21">xxxx</br> <font color=gray>00:24 yyy</font></br> <font color=gray>01:24 zzz</font></br> <a href="program.php?channel=1">More</a>
Design website as app
Hi All, What advises and architectural decisions are important when we build a website, so that it is easier to convert this into an mobile app later. all the business logic should be designed in services way ? all the navigation has to be decided at client side ? regards
When to link jQuery Mobile css?
I notice that there are many CSS files that comes with jQuery Mobile. The main one jquery.mobile-1.4.5.min.css is obviously required. But what about the rest? When do we need to include and link them? Do we need to include these files in the packaging for a mobile app or web site? jquery.mobile.external-png-1.4.5.min.css jquery.mobile.icons-1.4.5.min.css jquery.mobile.inline-png-1.4.5.min.css jquery.mobile.inline-svg-1.4.5.min.css jquery.mobile.structure-1.4.5.min.css jquery.mobile.theme-1.4.5.min.css
Cannot use "jquery" in directory name/url?
I am starting with a simple empty template (see below). Took me 2 hours discover a strange issue through various trial-and-error tests. Note the script tag src attribute is using "/libs/jquer/...". This is a deliberate misspelling missing the "y". The moment I switch the directory name (and thus URL path) to "/libs/jquery/..." and update the src attribute accordingly, the whole jQuery Mobile page formatting will fail. Is there a strange path or filename parsing issue? Did I break certain assumption
Buttons made from Link or Button Tags not initialized
Using jQuery 2.1.3 or 2.1.4 and jQueryMobile 1.4.5 buttons that are create from A or BUTTON tags are not being properly initialized. If I have: <input type="submit" id="input_type" value="Input Tag"> <button type="button" id="button_type">Button Tag</button> <a href="#" id="link_type" data-role="button">Link Tag</a> All three are properly rendered as buttons. However only the input[type=submit] is properly initialized. If I run: $('#input_type').button('disable') The button based on the input is
Checking the data-attributes on button press.
Hi, if I have a list view of four items all with a data-attribute - in this case data-color - how can I search through it to see if the value equals '-1'. If it does either enable or disable a confirm button. https://jsfiddle.net/ysyxvtyp/126/ Thanks.
Returning to default selection after collapse of select menu
Hi All, I'm using a jquery mobile form select menu similar to the ones on this page (http://demos.jquerymobile.com/1.0a4.1/docs/forms/forms-selects.html). What I am trying to do is whether the user chooses an option in the popup or just closes, I would like for the dropdown to go back to "Choose one" but it always sets to what was selected. Any thoughts on how to achieve this? This does not seem like it should be difficult. Thanks I apologize if this question was answered before but I have not been
Drag Swipe using PhoneGap
Hello, I am creating an app where I would like to swipe from one page to another. I tried using an Open Source jquery plugin I found called dragend and although it worked while I was testing it on my simulation, it didn't work when I transferred it to my android phone. I am probably not googling right because I can't find anything online on how to using drag swipe for transition. Can anyone point out how I can achieve this or give some samples from other online posts? I just need an idea on how to
getting scroll position while user is scrolling.
I am working on an app that I am putting into Cordova. All is working well except I want to hide part of the header when the user is scrolling down and then show it again when the user gets back to the top of the page. My problem is it seems that JQM only has scrollStart and scrollStop events which only hides/shows header when the user stops scrolling. I would prefer to hide/show while the user is scrolling like a native app? Is this possible? Thanks.
How to align collapsible inline with header text
Hi there, I have a collapsible in my header but it appear on it's own line which makes the header quite big. How can I align it (Options) with the header text (h1) to the right or left. Here is my code: <div data-role="page" id="home"> <div data-role="header"> <h1>App Title</h1> <div data-role="collapsible" data-collapsed="true" data-mini="true"> <h4>Options</h4> <ul id="options" data-role="listview" data-mini="true">
J query mobile multi-select custom pop up not closing.
Hi, I am using jquery.mobile-1.4.3 the multi-select custom popup does not close if it has more than 14 options in pop up. please suggest solution.
Usng jQuery Mobile and AngularJS
Is it possible to use AngularJS and JQuery Mobile? I am thinking of using AngularJS to separate my application logic from the UI. Hopefully, I do not have to change my application logic when swapping the UI. Here's the concern: would it be simple and straightforward? Or would it involve hacks and workarounds? What is the right way or cleanest way to go about making AngularJS and jQuery Mobile work together? Are they designed to co-exist and work well together? I read online on some people who tried
How to deselect an item from listview
Hi there! I have a dynamically generated listview on a page. When the page is displayed one specific item from listview is selected when I view the page on BlackBerry. When I view the page in Chrome on Desktop, none of the item from listview is selected. Not sure why on BlackBerry mobile, I see that an item is selected. Here is my code: $(document).on("pagebeforeshow", "#removedates", function () { var sc = new Array; sc = JSON.parse(localStorage.getItem("dates"));
How to collapse listview
Hi there, I have a multi-page template. On the homepage I have a listview which is closed when the homepage is initially displayed. The following code is in my homepage: <div data-role="collapsible" data-collapsed="true" data-mini="true"> <h4>Options</h4> <ul id="options" data-role="listview" data-mini="true"> <li><a href="#adddate">Add Date</a></li> <li><a href="#removedate">Remove Date</a></li> </ul>
data-role collapsible not opening at top of content
I'm using jquery mobil 1.4.5.min.js. If a data-role collapsible content is already expanded, displaying its content, and then I tap on a second data-role collapsible heading to expand its content, the content expands but scrolled down the content the distance that the first collapsible content was expanded. Thus the first expanded content always opens at the top of the content (which is good), while any following expanded content does not open at the top of its content. Is there a parameter to control
Page kinda "freezes" when clicking into list after having scrolled
i have spent some hours looking and searching the internet in order to fix some difficult bug. First some background: I use jQuery 1.9.1, jQueryMobile 1.3.2 and SignalR 2.2.1 I have on HTML file that contains 7 sections (pages) I test my WebApp on Win7 PC with Google Chrome, IE11 and iPad with iOS 9.0.2 The Error: On one of my pages, there is a List inside a container div, that contains 200 entries. When I scroll down the page and, after the scrolling stopped, tap on the display the following happens:
Returning the data value on a list view item.
I am a little perplexed on how I would search through and return the index on a listview item. http://jsfiddle.net/yTt9b/1833/ When using the button I want to locate and return the index of the colour (data-color) green. Thanks in advance.
Finding the first disabled list view item programatically.
Hi, if I have the following code how would I find the first disabled item with code returning the eq() of the element? <ul data-role="listview" data-inset="true" id="pageOptions"> <li><a href="#">Page 1</a></li> <li><a href="#">Page 2</a></li> <li><a href="#" class="disabled">Page 3</a></li> <li><a href="#" class="disabled">Page 4</a></li> </ul> Thanks in advance.
Validate Dynamic SELECT
Hi, I am populating dynamic SELECT in my PHP like this: <select name="cboRating[<?php echo $mysql_row["employee_evaluation_details_id"]; ?>]" id="cboRating[<?php echo $mysql_row["employee_evaluation_details_id"]; ?>]" data-native-menu="false" required> and in my jquery validate() I want to validate the cboRating to make sure it's required like this: cboRating: { required: true }, is it enough to sat cboRating although the name has some extra characters from employee_evaluation_details_id otherwise
When will jQuery Mobile 1.5 (or 2.0) be released?
The last update was January 2016. Is jQuery Mobile dead?
Next Page