PhoneGap slider support not functioning properly - jquery-mobile

Working with PhoneGap attempting to add a label and slider to an iOS iPad application, both the label and the slider will not appear on the page. The following is the code intended to generate the display:
<div data-role="fieldcontain">
<label for="quantity">Number of Cones:</label>
<input type="range" name="quantity" id="quantity" value="5" min="1" max="10" />
</div>
The above snippet properly produces:
Number of Cones:
<------|------->
but fails to display the label box with quantity initialized to 5.
What is the cause of this issue?

Related

stop remember me popup in chrome using java-script

i want to stop popup remember me box in asp mvc (programmatically) i tried autocomplete=off place password text-box and set it hidden but no solution is working.
Tried
autocomplete="off"
Tried
<input type="password" autocomplete="off" />
Tried
<form id="loginForm" action="login.cgi" method="post" autocomplete="off">
Tried
<input style="display:none">
<input type="password" style="display:none">
None of this working please guide me

Angular app on IOS doesn't show me keyboard, when i click on input. Why?

My Angular application doesn't show me keyboard, when i click on input for the first time. Second click and other shows it.
I don't have ngTouch and any function on inputs.
<div class="input-wrapper">
<input type="email" name="login" tabindex="1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" ng-model="form.userData.login" placeholder="{{'LOGIN_OR_EMAIL' | translate}}" required>
</div>
Nothing special in html
if you have
-webkit-user-select:none;
user-select:none;
in your css remove them.

How to checked jquery mobile radio button set via code

I use jquery mobile for build a Phonegap application. I create any radio sets like this :
I want to checked a radio in a switch case!
switch (font_family){ case 'tahoma': $('#radio-1').checked(); ... }
Can you help me?
From the picture I am assuming you are using jQM version 1.3.x, however this solution works with 1.4.x too.
Assuming you have markup similar to this:
<fieldset data-role="controlgroup" data-type="horizontal">
<legend>Font:</legend>
<input type="radio" name="thefont" id="radio-1" value="arial" checked="checked" />
<label for="radio-1">Arial</label>
<input type="radio" name="thefont" id="radio-2" value="verdana" />
<label for="radio-2">Verdana</label>
<input type="radio" name="thefont" id="radio-3" value="tahoma" />
<label for="radio-3">Tahoma</label>
</fieldset>
The script to switch to Tahoma would be:
$("[name='thefont']").prop( "checked", false ).checkboxradio( "refresh" );
$("#radio-3").prop( "checked", true ).checkboxradio( "refresh" );
The first line unchecks all boxes and the second checks the tahoma box. In jQM you must refresh the checkboxradio widget after changing values.
DEMO

Refreshing jQueryMobile styling on radio buttons on the fly

I'm attempting to re-style a vertical group of radio buttons, and the new theme I add to one of them shows up but the theme I remove from another/the rest doesn't go away.
My goal is to change theme of the selected radio button (the related controls, anyway) to make it stand out more when selected.
<div data-role="content">
...
<fieldset data-role="controlgroup" id="showChooser">
<legend><h3>Which show are you attending?</h3></legend>
<input type="radio" name="activeShow" id="activeShow1" value="1" />
<label for="activeShow1">
<h2>Choice 1</h2>
<p>03/25/2012 - 03/27/2012</p>
</label>
<input type="radio" name="activeShow" id="activeShow2" value="2" />
<label for="activeShow2">
<h2>Choice 2</h2>
<p>03/25/2012 - 03/27/2012</p>
</label>
<input type="radio" name="activeShow" id="activeShow3" value="3" />
<label for="activeShow3">
<h2>Choice 3</h2>
<p>03/25/2012 - 03/27/2012</p>
</label>
...
</fieldset>
...
</div>
This results in the following list being displayed:
(source: skitch.com)
So, on-click of one of them, I'm running this code:
$('#showChooser input:radio').click(function(e) {
$("#showChooser label").attr('data-theme','c');
$(this).next().attr('data-theme','e');
$("#settings").page();
});
The first line should, in theory, reset them all to the base-state of theme 'C', and then the second line would highlight the selected item. I can step through and see that these HTML changes are made, so it's obvious that what needs to happen next is for jQuery Mobile to re-parse and update the display.
Note the desperate attempt at refreshing the whole page with .page() at the end -- even that doesn't achieve the desired effect.
The first time you click one, it has the desired effect:
But subsequent clicks don't appear to un-highlight any previously selected rows:
I've also tried $("#showChooser").listview("refresh") and a few other similar things that I can't recall, but none have the desired effect. So what am I missing/doing wrong?
I had the exact same problem.
$('#showChooser input:radio').click(function(e) {
$("#showChooser label").attr('data-theme','c').removeClass('ui-btn-up-e');
$(this).next().attr('data-theme','e').addClass('ui-btn-up-e');
});
See this jQuery forum post.

jQuery Mobile Slider Step Attribute Not Working

i am using Jquery mobile slider.I want make the slider in steps.
so i have tried with this.
<div data-role="page">
<div data-role="content">
<label for="slider" class="ui-hidden-accessible">Input slider:</label>
<input type="range" name="slider" id="slider_0" value="25" min="0" max="100" step="25" />
</div>
the slider is sliding well but it is not moving in the steps.
eg: 100/25 =4
so it should point only at 25,50,75,100 but its sliding every where.
I have seen an live example at this place. its working fine here but why its not working for me.
http://code.jquery.com/mobile/latest/demos/docs/forms/slider/index.html
here is my jsfiddle
http://jsfiddle.net/chakrirajni/pfNDB/
Thanks,
This Bug has been Fixed in Latest version JQuery Mobile Libraries mentioned below
1)stable version - 1.0.1 http://jquerymobile.com/blog/2012/01/26/jquery-mobile-1-0-1-released/
2)Unstable build - 1.1.0 RC1 http://jquerymobile.com/blog/2012/02/28/announcing-jquery-mobile-1-1-0-rc1/
Ya got it.
I have used these likns.
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0-rc.1/jquery.mobile-1.1.0-rc.1.min.css" />
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.1.0-rc.1/jquery.mobile-1.1.0-rc.1.min.js"> </script>
its working fine.
but i dont want to see the textbox beside the slider. how can i do that in this version in
my code looks like this.
<label for="slider" class="ui-hidden-accessible">
Input slider:</label>
<input type="range" name="slider" id="slidstep" step="25" value="0" min="1" max="100"/>
Thanks for ur help.

Resources