jQuery UI Widgets › Forums › Editors › CheckBox, RadioButton › how to restrict jqxradiobutton navigable by keyboard tab key
Tagged: Button, jqxRadioButton, radio, radio button, tab, tabindex
This topic contains 4 replies, has 2 voices, and was last updated by Venu Gopal 10 years, 11 months ago.
-
Author
-
how to restrict jqxradiobutton navigable by keyboard tab key… i tried putting tabindex property = -1 to the div. but it is showing error.
Thank you
Hello Venu Gopal,
Here is a working example with tabindex = -1:
<!DOCTYPE html><html lang="en"><head> <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" /> <script type="text/javascript" src="../../scripts/gettheme.js"></script> <script type="text/javascript" src="../../scripts/jquery-1.10.2.min.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxradiobutton.js"></script> <script type="text/javascript"> $(document).ready(function () { var theme = ""; $("#jqxRadioButton").jqxRadioButton({ width: 250, height: 25, checked: true, theme: theme }); $("#jqxRadioButton2").jqxRadioButton({ width: 250, height: 25, theme: theme }); $("#jqxRadioButton3").jqxRadioButton({ width: 250, height: 25, theme: theme }); $("#jqxRadioButton4").jqxRadioButton({ width: 250, height: 25, disabled: true, theme: theme }); var clearLog = function () { var log = $('#events').find('span'); if (log.length >= 2) { log.remove(); } } $("#jqxRadioButton").on('change', function (event) { clearLog(); var checked = event.args.checked; if (checked) { $("#events").prepend('<div><span>Checked: 12 Months Contract</span></div>'); } else $("#events").prepend('<div><span>Unchecked: 12 Months Contract</span></div>'); }); $("#jqxRadioButton2").on('change', function (event) { clearLog(); var checked = event.args.checked; if (checked) { $("#events").prepend('<div><span>Checked: 6 Months Contract</span></div>'); } else $("#events").prepend('<div><span>Unchecked: 6 Months Contract</span></div>'); }); $("#jqxRadioButton3").on('change', function (event) { clearLog(); var checked = event.args.checked; if (checked) { $("#events").prepend('<div><span>Checked: 3 Months Contract</span></div>'); } else $("#events").prepend('<div><span>Unchecked: 3 Months Contract</span></div>'); }); }); </script></head><body class='default'> <div id='jqxWidget' style='font-family: Verdana Arial; font-size: 12px; width: 400px;'> <h3> House Contract</h3> <div style='margin-top: 10px;' id='jqxRadioButton' tabindex="-1"> 12 Months Contract</div> <div style='margin-top: 10px;' id='jqxRadioButton2' tabindex="-1"> <span>6 Months Contract</span></div> <div style='margin-top: 10px;' id='jqxRadioButton3' tabindex="-1"> <span>3 Months Contract</span></div> <div style='margin-top: 10px;' id='jqxRadioButton4' tabindex="-1"> <span>1 Month Contract</span></div> <div style='margin-top: 10px;'> <div> Events: </div> <div id='events'> </div> </div> </div></body></html>
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/i’ve tried the example above,it is also not working. still iam able to navigate through keyboard tab.
Hello Venu Gopal,
The example is working as expected on our side. Please share what browser you are using and its version. Also, please make sure you have the latest version of jQWidgets (3.0.4).
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Thank you…
using the latest version of jQWidgets library solved the problem. -
AuthorPosts
You must be logged in to reply to this topic.