Hello my_2000,
Thank you for these details.
Please, take a look at these code snippets:
HTML:
<div id="jqxSwitchButton"></div>
<br>
<div id="button1" class="SwitchButton" my_value="1"></div><br>
<div id="button2" class="SwitchButton" my_value="2"></div><br>
<div id="button3" class="SwitchButton" my_value="3"></div><br>
JavaScript:
$("#jqxSwitchButton").jqxSwitchButton({
height: 35,
width: 80,
theme: "energyblue"
});
$("#jqxSwitchButton").bind("change", function (event) {
console.log(event);
});
$(".SwitchButton").jqxSwitchButton({ height: 30, width: 70});
$(".SwitchButton").on("change", function (event) {
var target = event.target;
var result = target.getAttribute("my_value");
console.log(result);
});
Best Regards,
Hristo Hristov
jQWidgets team
https://www.jqwidgets.com