jquery-mobile

How to add pinch/zoom behavior using jQuery Mobile?

我的梦境 提交于 2019-12-14 03:52:17
问题 I need to create a Mobile Application using jquery Mobile. I don't understand how to implement pinch-zooming for an image that is displayed in the app. 回答1: Is there a particular reason to use jQuery Mobile for this? The fact your application UI uses it to build your UI does not mean this behavior needs to be implemented using it. The are other options, like the below jQuery plug-in. Note that a Worklight application by default uses jQuery anyway. So you're "half-way" there. I've successfully

asp.net mvc TextAreaFor is not getting validated as a required field

这一生的挚爱 提交于 2019-12-14 03:45:50
问题 I have a data entry field where I'm gathering notes. The note data element is required for each note. Here's my model: public interface INoteDataEntryViewModel : IMobilePageDataContract { int CourseId { get; set; } [Required(ErrorMessage = @"Note is required")] String Note { get; set; } [DisplayName(@"Note Date")] DateTime NoteDate { get; set; } } You can see that I have the Required attribute for the Note property. I'm using Razor to display the data entry form element: <div data-role=

$(window).height() false value on iOS 5.1 PhoneGap 1.7 jquery mobile when launching the app in landscape mode

痞子三分冷 提交于 2019-12-14 03:35:02
问题 If if launch the application holding the iPhone in portrait mode, everything works fine even when i rotate the iPhone everything still working good. But when i launch my app holding the iPhone in landscape mode this does not work good on my first rotation after landscape launch, it ruins my design completely. This is the sequence of var viewport = $(window).height values: Launching Portrait : Launch: $(window).height() = 460px / $(window).width() = 320px; Rotate Landscape left: $(window)

How do I refresh the CSS for a DIV loaded with external content in JQuery Mobile

十年热恋 提交于 2019-12-14 03:25:36
问题 I have read all of your comments, but none of the solutions I read seem to work. I have a piece of Jquery code that gets some content from an external PHP script which updates a div in my application. After the new data is loaded, it doesn't have the Jquery Mobile styling. I've seen how some have used .page() or trigger("refresh"), etc... but none of that works to refresh an entire div. Here is my code and the portion of html in question: function getcontent(pg) { $("xyz").html(""); $.get(

Favourite functionality Ruby on Rails

隐身守侯 提交于 2019-12-14 03:11:59
问题 I need to add functionality to my project but I have only been using Ruby on Rails for about 2 weeks and I'm kind of lost. The question is the following: I need to add a controller "toogle_favourite", already made it with "rails generate controller toogle_favourite" Now I need to add an action to the controller "toogle_favourite" that modifies the value of the field "favourite" (favourite is a boolean field I made before with scaffolding). In addition, my application needs to implement

CSS: Android Web App: Color gradient issue

こ雲淡風輕ζ 提交于 2019-12-14 03:03:44
问题 I am developing an Application with jQuery Mobile and Phonegap. I want to have a color gradient from #3c3c3c (grey) to #000000 (black) in the background but when I use this code background: -webkit-linear-gradient(top, #3c3c3c, #000000); you can see just a few big bars with different grey shades. So there is no linear gradient. Also you are able to see some green and some violet bars. - Sorry as a new user I am not able to insert a Screenshot - I also tried to instead insert a background

jQueryMobile 'data-scroll=true' does not work on dynamically injected pages

本小妞迷上赌 提交于 2019-12-14 03:03:14
问题 data-scroll="true" works fine if the page is static page, but if I add page dynamically using javascript it does not work. My Header section is : <link rel="stylesheet" href="css/jquery.mobile-1.0rc2.css" /> <link rel="stylesheet" href="css/jquery.mobile.scrollview.css" /> <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.js"></script> <script type="text/javascript" src="js/jquery.mobile-1.0rc2.js"></script> <script type="text/javascript" src="js/jquery.easing.1.3.js"><

jQuery Mobile Custom download of collapsible set not working/triggering on load?

三世轮回 提交于 2019-12-14 02:36:58
问题 Hi I am new to jquery mobile so forgive me if this is a stupid question. I'm trying to implement a collapsible set on my page. I have downloaded a custom file from the jquery mobile website using the download builder and just choosing the collapsible set widget, which automatically selects what I assume are the necessary functions to include. I've followed the instructions on the getting started guide, linked the css files and the custom js file which do load I've checked with firebug. I've

JQuery Mobile 1.4.5 - don't navigate 'back' to a Dialog page

断了今生、忘了曾经 提交于 2019-12-14 02:34:41
问题 Prior to JQM 1.4, I created dialogues using data-role="dialog" and those pages were not added to the back stack, so navigating off one and then pressing back would bring you to the page before the dialog. Now with 1.4.5, dialogues are defined as data-role="page" with data-dialog="true" . Using this method, the dialog is added to the back stack, so if I navigate off the dialog and then tap back I am returned to the dialog. This is not the behavior I want. Is there a way, when the dialog opens,

How do you dynamically add side panel menu items with jQuery Mobile and keep all CSS styling?

*爱你&永不变心* 提交于 2019-12-14 02:33:26
问题 I pulled very small snippets from my code to show a very simple example of my problem. I put it in JSFiddle -> http://jsfiddle.net/hollycoffee/LjLMU/ I have researched and found others with the same issue and they either tried addClass or refresh jQuery methods, so I tried both in a few different places in my code and nothing worked, so I'm hoping that by making the simple example in JSFiddle, someone can point me to exactly what I am missing and where. The example is random and won't make