jQWidgets is a JavaScript framework for making web-based applications for PC and mobile devices. It is a very powerful, optimized, platform-independent, and widely supported framework. The jqxDocking is used for representing a widget to manage multiple windows and also the layout of a web page. Here each window in the specified jqxDocking can do multiple tasks such as it can be dragged around the Web page, docked into docking zones, removed from the docking, collapsed into a minimized state for hiding its content, and also can be expanded for displaying its content.
The cookieOptions property is used for setting or getting the cookie options for the specified jqxDocking.
Syntax:
-
For setting the cookieOptions property:
$('#jqxDocking').jqxDocking({ cookieOptions: {
domain: 'jqwidgets.com', expires: 90
} });
-
For getting the cookieOptions property:
var cookieOptions = $('#jqxDocking')
.jqxDocking('cookieOptions');
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” />
<script type=”text/javascript” src=”scripts/jquery.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxcore.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxdocking.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxwindow.js”></script>
Example: The below example illustrates the jQWidgets jqxDocking cookieOptions property.
HTML
<!DOCTYPE html>
< html lang = "en" >
< head >
< link rel = "stylesheet"
href = "jqwidgets/styles/jqx.base.css"
type = "text/css" />
< script type = "text/javascript"
src = "scripts/jquery.js" >
</ script >
< script type = "text/javascript"
src = "jqwidgets/jqxcore.js" >
</ script >
< script type = "text/javascript"
src = "jqwidgets/jqxdocking.js" >
</ script >
< script type = "text/javascript"
src = "jqwidgets/jqxwindow.js" >
</ script >
</ head >
< body >
< center >
< h1 style = "color: green;" >
GeeksforGeeks
</ h1 >
< h3 >
jQWidgets jqxDocking cookieOptions Property
</ h3 >
< div id = "jqx_Docking"
style = "margin: 25px;"
align = "left" >
< div >
< div id = "Window" >
< div >Window</ div >
< div >
< h8 >Content of the window</ h8 >
< ul >
< li >GFG</ li >
< li >CSE</ li >
</ ul >
</ div >
</ div >
</ div >
</ div >
< input type = "button" style = "margin: 29px;"
id = "jqxbutton_for_cookieOptions"
value = "Value of the cookieOptions property" />
< div id = "log" ></ div >
< script type = "text/javascript" >
$(document).ready(function () {
$("#jqx_Docking").jqxDocking({
width: 250,
cookieOptions: {
domain: 'jsfiddle.net',
expires: 120
}
});
$("#jqxbutton_for_cookieOptions").
jqxButton({
width: 280
});
$('#jqxbutton_for_cookieOptions').on(
'click', function () {
var CookieOptions_Value =
$('#jqx_Docking').jqxDocking(
'cookieOptions');
$("#log").html(JSON.stringify(
CookieOptions_Value));
});
});
</ script >
</ center >
</ body >
</ html >
|
Output:

Reference: https://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxnavigationbar/jquery-navigationbar-api.htm
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape,
GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out -
check it out now!
Last Updated :
05 Nov, 2021
Like Article
Save Article