如何在 JQuery Mobile 1.4.5 中获取复选框翻转开关的值?

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

我正在使用以下标记在 jQuery Mobile 1.4.5 中创建基于复选框的 Flipswitch:

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

显然,获取基于 select 的 Flipswitch 值的方法相同:

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

不适用于基于复选框的版本,我总是得到 "on" 的值。

我做错了什么?有没有办法获取基于 select 的版本的值?

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

提前致谢

而不是阅读 .val() 阅读已检查的 属性:

alert($("#flip-1").prop("checked"));

已更新FIDDLE