How to get the value of a checkbox flipswitch in JQuery Mobile 1 4 5

0 votes

I'm using following markup to create a checkbox-based Flipswitch in jQuery Mobile 1.4.5:

<label for="flip-1">Checkbox Flip switch:</label>
<input data-role="flipswitch" name="flip-1" id="flip-1" type="checkbox">

Apparently, the same method to get the value for a select-based Flipswitch:

$("#flip-1").val()

is not working with the checkbox-based version, and i'm getting always the value of "on".

What i'm doing wrong here? Is there a way to get the value as for the select-based version?

Fiddle: http://jsfiddle.net/2ckHr/296/

Thanks in advance

jquery-mobilejquery-mobile-flipswitch

Aug 22 in Web Development by gaurav
• 18,960 points
25 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Web Development

0 votes
1 answer

How to get value of HTML Checkbox from onclick/onchange events?

Hello @kartik, Use the click event, which won't fire until ...READ MORE

answered Oct 7, 2020 in Web Development by Niroj
• 82,780 points
3,814 views
0 votes
0 answers

How to add a link in Jquery PrettyPhoto to download the image

I am using Jquery PrettyPhoto to have ...READ MORE

Jun 29 in Web Development by gaurav
• 18,960 points
45 views
0 votes
0 answers

how to get values of columns for a selected row through jQuery

here i am trying to fetch values ...READ MORE

Jul 1 in Web Development by gaurav
• 18,960 points
614 views
0 votes
0 answers
0 votes
0 answers

How to stretch a GIF to fill the whole div using jQuery Mobile?

I'm using jQuery Mobile to create a ...READ MORE

Aug 22 in Web Development by gaurav
• 18,960 points
22 views
+1 vote
1 answer

How to access the Angularjs scope of a particular html element from our console?

Hello, You should follow the below steps:-- 1.Compile and ...READ MORE

answered Jan 21, 2020 in Web Development by Niroj
• 82,780 points

edited Jan 21, 2020 by Niroj 1,055 views
0 votes
1 answer

Get checkbox value in jQuery

To get the value of the Value ...READ MORE

answered Jun 23 in Web Development by rajatha
• 7,440 points
26 views
0 votes
1 answer

Get checkbox value in jQuery

if you have set a class or id for it, you ...READ MORE

answered Jun 23 in Web Development by rajatha
• 7,440 points
46 views
0 votes
0 answers
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP