jQWidgets is a JavaScript framework for making web-based applications for PC and mobile devices. It is a very powerful and optimized, platform-independent, and widely supported framework. The jqxCheckBoxGroup widget is used to display a group of checkboxes that allows users to select or deselect the checkbox group.
The rtl property is used to set or return a value signifying if the elements of the stated jqxCheckBoxGroup are arranged in order to support locales utilizing the right-to-left fonts. It is of type boolean and its default value is “false”.
Syntax:
- Setting the rtl property.
$("#jqxCheckBoxGroup").jqxCheckBoxGroup({ rtl: true });
- Returning the rtl property.
var rtl = $('#jqxCheckBoxGroup').jqxCheckBoxGroup('rtl');
Linked Files: Download jQWidgets from the given link. In the HTML file, locate the script files in the downloaded folder.
<link rel=”stylesheet” href=”jqwidgets/styles/jqx.base.css” type=”text/css” />
<link rel=”stylesheet” href=”jqwidgets/styles/jqx.energyblue.css”>
<script type=”text/javascript” src=”scripts/jquery-1.11.1.min.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxcore.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxcheckbox.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxcheckboxgroup.js”></script>
Example 1: The below example illustrates the jQWidgets jqxCheckBoxGroup rtl property.
<!DOCTYPE html> < html lang = "en" >
< head >
< link rel = "stylesheet" href =
"jqwidgets/styles/jqx.base.css" type =
"text/css" />
< link rel = "stylesheet" href =
"jqwidgets/styles/jqx.energyblue.css" >
< script type = "text/javascript" src =
"scripts/jquery-1.11.1.min.js" ></ script >
< script type = "text/javascript" src =
"jqwidgets/jqxcore.js" ></ script >
< script type = "text/javascript" src =
"jqwidgets/jqxcheckbox.js" ></ script >
< script type = "text/javascript" src =
"jqwidgets/jqxcheckboxgroup.js" ></ script >
< script type = "text/javascript" src =
"jqwidgets/jqxbuttons.js" ></ script >
</ head >
< body >
< center >
< h1 style = "color: green;" >
GeeksforGeeks
</ h1 >
< h3 >
jQWidgets jqxCheckBoxGroup rtl Property
</ h3 >
< h4 >Select your Company name:</ h4 >
< div class = 'jqxcheckboxgroup1' >GfG</ div >
< div class = 'jqxcheckboxgroup2' >TCS</ div >
< br >
< input type = "button" style = "margin: 5px;" id = "btn" value = "Click here" />
< div id = "log" ></ div >
< script type = "text/javascript" >
$(document).ready(function () {
$(".jqxcheckboxgroup1").jqxCheckBox({
theme: 'energyblue',
rtl: true,
});
$(".jqxcheckboxgroup2").jqxCheckBox({
theme: 'energyblue',
rtl: true,
});
$("#btn").jqxButton({
width: 180,
theme: 'energyblue',
});
$('#btn').jqxButton().
click(function () {
var r =
$('.jqxcheckboxgroup2').jqxCheckBox('rtl');
$('#log').text(r);
})
});
</ script >
</ center >
</ body >
</ html >
|
Output:
Example 2: The following is another example of the jqxCheckBoxGroup rtl property in jQWidgets.
<!DOCTYPE html> < html lang = "en" >
< head >
< link rel = "stylesheet" href =
"jqwidgets/styles/jqx.base.css" type = "text/css" />
< link rel = "stylesheet" href =
"jqwidgets/styles/jqx.energyblue.css" >
< script type = "text/javascript"
src = "scripts/jquery-1.11.1.min.js" ></ script >
< script type = "text/javascript"
src = "jqwidgets/jqxcore.js" ></ script >
< script type = "text/javascript"
src = "jqwidgets/jqxcheckbox.js" ></ script >
< script type = "text/javascript"
src = "jqwidgets/jqxcheckboxgroup.js" ></ script >
< script type = "text/javascript"
src = "jqwidgets/jqxbuttons.js" ></ script >
< style >
body {
margin-left: 100px;
}
.jqxcheckboxgroup {
margin-left: 50px;
}
</ style >
</ head >
< body >
< center >
< h1 style = "color: green;" >
GeeksforGeeks
</ h1 >
< h3 >
jQWidgets jqxCheckBoxGroup rtl Property
</ h3 >
< h4 >Select your Company name:</ h4 >
< div class = 'jqxcheckboxgroup' >GfG</ div >
< div class = 'jqxcheckboxgroup' >TCS</ div >
< div class = 'jqxcheckboxgroup' >Capgemni</ div >
< div class = 'jqxcheckboxgroup' >Wipro</ div >
< br >
< input type = "button" style = "margin: 5px;" id = "btn" value = "Click here" />
< div id = "log" ></ div >
< script type = "text/javascript" >
$(document).ready(function () {
$(".jqxcheckboxgroup").jqxCheckBox({
rtl: false,
});
$("#btn").jqxButton({
width: 180,
});
$('#btn').jqxButton().
click(function () {
var r =
$('.jqxcheckboxgroup').jqxCheckBox('rtl');
if (r === true) {
$('#log').text("True!");
}
else {
$('#log').text("False!");
}
});
});
</ script >
</ center >
</ body >
</ html >
|
Output: