jquery-mobile

jquery mobile, use android hardware back button to close a panel

青春壹個敷衍的年華 提交于 2019-12-13 16:26:55
问题 I created a panel using jqm, and I'd like to be able to use the andoird phones back button to close it when it's open. For now, when the panel is open and I use the back button, it goes to the previous page, instead of only closing the panel. Any idea how to do this ? Here's my html page with the panel : <div id="welcome-page" data-role="page"> <a data-role="button" id="open-panel" data-theme="a">Enquiries</a> </div> Here's the structure of my js file for the panel : $(document).on(

How to show only before dates in JTSAGE date picker

泄露秘密 提交于 2019-12-13 16:25:11
问题 I use Jtsage date picker in my mobile application(jquery mobile and phonegap). I want to show only today and before today date( hide future dates ) so i refer this documentaion. In that documentation they mention afterToday,beforeToday,notToday,minDays,maxDays . I use beforeToday for my datebox but it seems not working. My date picker calling is like: <input name="mydate" id="mydate" type="date" data-role="datebox" data-options='{"mode": "datebox", "useNewStyle":true,"afterToday":false,

jQuery mobile: panel open not triggered after page navigation

家住魔仙堡 提交于 2019-12-13 15:36:02
问题 I am creating a mobile website using jQuery mobile (1.3). In this site I'm using a panel for my menu, which get activated by the 'bars' button in the top left of the screen or by swiping from left to right (on desktops; click and move mouse to the right). This all is working fine until I navigate to a different page. The new page loads using the jQuery mobile AJAX function, in the console.log my panel div is logged so I know it's there but the .panel('open') function is not triggered. I tried

Changing the Selected value of Select Menu Jquery Mobile

扶醉桌前 提交于 2019-12-13 15:23:22
问题 I have created a form and have stored the values selected by the user in a database. But now if the user wants to edit his form, i need to reload the form with the previous values.I am using JQUERY MOBILE I retrieved his previous values from the database but now i am having a problem with loading the values in a select Menu.Can anyone help me ? I have used the following code :- var nameVar = (dataset.item(id)['name']); // Getting the name from the database $('#StateName').val(nameVar); //

JQM 1.4.1: The new event 'pagecontainershow'

倖福魔咒の 提交于 2019-12-13 14:51:11
问题 I got confused with JQM changes: As you may know JQM deprecated the event: $(document).on('pageshow', '#MyPage', function(){ and replaced it by: $(document).on('pagecontainershow', function (e, ui) { However this new event is not attached to an specific page as the previous was. Nevertheless, the event: $(document).on('pagecreate', '#MyPage', function(){ is still attached to a specific page, and i think other pages events are still attached to specific pages. MY QUESTION IS: The fact that

$.ajax on jquery mobile

浪子不回头ぞ 提交于 2019-12-13 14:18:53
问题 $.ajax not works properly by using jquery mobile framework... it just let us downoad html file.... if we want to call 'ActionMethod' then it not works: $.ajax({ url:'Home/CallMe', success: function(result) { alert(result); } // edited }); It hangs the system... I'm using IPhone Emulator for testing.... Can anyone let me know why above not works and why below works while using jquery mobile framework? $ .ajax({ url:'htmlFile.htm', success: function(result) { alert(result); } // this line is

Put login form to the right of the page

。_饼干妹妹 提交于 2019-12-13 13:15:22
问题 Here is my jsFiddle. Despite the fact that I am applying this rule #login { float: right; } the form will stay next to Leaderboard link. In a mobile, this is not a problem, since everything will be displayed in a one column fahsion, but in a desktop I would like the logo to be to leftmost position, the textbox and Leaderboard to be somewhere in the center and the login to the rightmost position. What am I missing? Notice that with the actual logo everything is fine (with regards to the logo),

how do i re-position fixed Header & Footer?

蹲街弑〆低调 提交于 2019-12-13 12:44:00
问题 I have got some issues when using fixed Header & Footer, But some suggest on me to use Position: Absolute instead of Fixed and re-position Header and footer when scroll using JavaScript Code, Does any one know how to do this? Or this issue faced him. Any suggestion would be helpful. Best Regards. 回答1: Ahmed, I just came over here from the other thread we had been discussing. Your question isn't clear enough for the other folks to answer. Your question should include the fact that you need to

Should I enhance Jquery Mobile elements on the client or send enhanced markup with data-enhance=“false”?

南楼画角 提交于 2019-12-13 12:29:36
问题 I have a product search where I'm sending back results with each result containing a two button JQM controlgroup. I'm sending 24 records at a time, so this will be 24 controlgroups to enhance, like so: <div data-role="controlgroup" data-type="horizontal" class="submitButton linkBox"> <input type="button" class="singleLoader" data-brand="#d#" data-index="#e#" value="#tx#" /> <input type="button" class="selector" data-brand="#d#" data-index="#e#" data-iconpos="notext" data-icon="fav" value="#tx

PhoneGap unable to getDuration() out of Media API, but other methods work

你。 提交于 2019-12-13 11:42:35
问题 I'm building out an audio media recorder/player with PhoneGap. It's all working beautifully, but I've hit a wrinkle I can't seem to iron. my_media.play(); does indeed play the media w/o error in my Eclipse or XCode consoles which is why the alert that is showing a -1 is puzzling. I expect my_media.getDuration(); to return the duration of the file I'm attempting to play. My try/catch block isn't throwing an error, I'm quite puzzled on this one. Here's the PhoneGap documentation on Media