Questions tagged [jquery-mobile-flipswitch]

The flip switch is JQuery mobile's toggle switch widget. It can be operated by clicking or swiping.

A toggle switch is a common element in User Interfaces mimicking a physical switch that allows the user to select between two states. To create a basic on/off switch in JQuery-mobile use a <select> with two options and the attribute data-role="slider":

<label for="flip-1">Select slider:</label>
<select name="flip-1" id="flip-1" data-role="slider">
    <option value="off">Off</option>
    <option value="on">On</option>
</select>
38 questions
6
votes
1 answer

How to only fire event if flipswitch is manually switched

I've created an jQuery Mobile flipswitch like this and I listen to changes on this flipswitch $( document ).on(…
4
votes
1 answer

How to change jQuery Mobile flipswitch size

I need a jQuery Mobile flipswitch with custom width & height. I managed to change the size of it by wrapping the flipswitch in a div and applying the following CSS: #flipswitchWrapper .ui-flipswitch { position:absolute; …
Dinko Ivanov
  • 150
  • 2
  • 12
3
votes
1 answer

How to get the value of a checkbox flipswitch in JQuery Mobile 1.4.5?

I'm using following markup to create a checkbox-based Flipswitch in jQuery Mobile 1.4.5: Apparently, the same method to get…
deblocker
  • 7,629
  • 2
  • 24
  • 59
3
votes
1 answer

How to make this flipswitch work based on value of mysql using php

I have bought an admin panel based on bootstrap/html which comes with loads of great features one of them is flip switch which looks very sleek and wish to use that for my status of any product. This is how the actual codes look like
2
votes
2 answers

cannot call methods on flipswitch prior to initialization

I want to set the selected value of a jQuery Mobile flipswitch: When doing the following I get an error: …
vespino
  • 1,714
  • 3
  • 15
  • 28
2
votes
1 answer

Refresh a jQuery Mobile flipswitch

I'm working with jQuery Mobile and I tried to refresh a flipswitch but when I try to do $("#flipEnabled").slider("refresh"); I get an error in the console : Uncaught Error: cannot call methods on slider prior to initialization; attempted to call…
2
votes
3 answers

jquery mobile - change flip switch default state

I'm using jQuery mobile's flip switch and by default the switches are off. I can't figure out how to set the default value to 'ON'
And apart from including those libraries, this…
Lenoxus
  • 545
  • 1
  • 4
  • 19
1
vote
1 answer

How to right align a flipswitch in jquery mobile 1.4.5

I'm trying to create a "Preference" page for a mobile App created with JQM and PhoneGap. The flipswitch appears right in front of the text, but not aligned to the right (as native preferences/settings usually appear), so it looks very…
1
vote
1 answer

Add Value to flip toggle switch

I have this flip switch, how to change to yes or No. But I can change green to red, but adding text to it is really challenging for me. How to add text, to this slider. When Green color comes it should be yes and when Red it should be No. I need…
1
vote
0 answers

JQueryMobile: Load pages with Flip toggle switch

I have jquery mobile html file with two pages.
I want to use the jquery mobile flip toggle switch to load either of the pages,
1
vote
1 answer
1
vote
1 answer

jQuery Mobile - changing the flipswitch on click

I have a disabled flipswitch. When the flipswitch is clicked a popup appears asking the user if they're sure they want to change the flipswitch. If they click yes then they will have to reanswer several questions. I want to be able to change the…
1
vote
0 answers

Start flip switch handle in middle on page load

Is it anyway possible to start the flip toggle switch handle in the middle of the slider to initially show the two slider options so that the user can know what the two options are right away instead of toggling the switch?
1
2 3