Switch not working with Jquery


Topic: Switch not working with Jquery

alvintng pro asked 3 years ago

Hi, your switches always show true regardless of switch position i.e. $('#checkboxid').val() == Yes. I need to update certain fields depending on the switch. Please help!

alvintng pro commented 3 years ago

Sorry, the value is always 'on', not 'Yes'.

Piotr Glejzer staff commented 3 years ago

Hi, do you need something like that? $('#checkboxid').val('Yes'); console.log($('#checkboxid').val()); Best, Piotr

Please insert min. 20 characters.
Status

Open

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No