data attribute always false

data attribute always false

Hi,

I have this fiddle :


trying to use switchButton to get the boolean data from data attribute, in this example I have two , one true and one false :

  1.  <div class="globalswitch" data-gswitch='true'>

and


  1.   <div class="globalswitch" data-gswitch='false'>

but the result, the button is always false.

Thanks.