jqwidgets-scripts-custom
Version:
jQWidgets is an advanced jQuery, Angular 7, Vue, React, ASP .NET MVC, Custom Elements and HTML5 UI framework.
199 lines (180 loc) • 8.8 kB
HTML
<html lang="en">
<head>
<title id='Description'>Custom Element Menu DefaultFunctionalitiy</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1 maximum-scale=1 minimum-scale=1" />
<meta name="description" content="This is an example of default functionalities in Custom Element Menu." />
<link rel="stylesheet" href="../../../jqwidgets/styles/jqx.base.css" type="text/css" />
<link rel="stylesheet" href="../../../styles/demos.css" type="text/css" />
<script type="text/javascript" src="../../../scripts/webcomponents-lite.min.js"></script>
<script type="text/javascript" src="../../../jqwidgets/jqxcore.js"></script>
<script type="text/javascript" src="../../../jqwidgets/jqxcore.elements.js"></script>
<script type="text/javascript" src="../../../jqwidgets/jqxmenu.js"></script>
<script type="text/javascript" src="../../../jqwidgets/jqxcheckbox.js"></script>
<script type="text/javascript" src="../../../scripts/demos.js"></script>
<script>
window.onload = function() {
var myMenu = document.querySelector('jqx-menu');
var myCheckBox = document.querySelectorAll('jqx-check-box');
myCheckBox[0].addEventListener('change', function(event) {
var value = event.args.checked;
if (!value) {
myMenu.animationShowDuration = 0;
myMenu.animationHideDuration = 0;
myMenu.animationShowDelay = 0;
}
else {
myMenu.animationShowDuration = 300;
myMenu.animationHideDuration = 200;
myMenu.animationShowDelay = 200;
}
});
myCheckBox[1].addEventListener('change', function(event) {
var value = event.args.checked;
if (!value) {
myMenu.disabled = false
}
else {
myMenu.disabled = true
}
});
myCheckBox[2].addEventListener('change', function(event) {
var value = event.args.checked;
if (!value) {
myMenu.enableHover = false
}
else {
myMenu.enableHover = true
}
});
myCheckBox[3].addEventListener('change', function(event) {
var value = event.args.checked;
if (!value) {
myMenu.autoOpen = false
}
else {
myMenu.autoOpen = true
}
});
myCheckBox[4].addEventListener('change', function(event) {
var value = event.args.checked;
if (!value) {
myMenu.showTopLevelArrows = false
}
else {
myMenu.showTopLevelArrows = true
}
});
};
</script>
</head>
<body>
<div class="example-description">
Custom element Menu makes it easy to add menus to your website or web application. With the Custom element Menu you can create website menus, customized context menus, or application-style menu bars with just a small amount of scripting.
</div>
<div id='jqxWidget' style='height: 300px;'>
<jqx-menu style='visibility: hidden; margin-left: 5px; visibility: visible'>
<ul>
<li><a href="#Home">Home</a></li>
<li>
Solutions
<ul style='width: 250px;'>
<li><a href="#Education">Education</a></li>
<li><a href="#Financial">Financial services</a></li>
<li><a href="#Government">Government</a></li>
<li><a href="#Manufacturing">Manufacturing</a></li>
<li type='separator'></li>
<li>
Software Solutions
<ul style='width: 220px;'>
<li><a href="#ConsumerPhoto">Consumer photo and video</a></li>
<li><a href="#Mobile">Mobile</a></li>
<li><a href="#RIA">Rich Internet applications</a></li>
<li><a href="#TechnicalCommunication">Technical communication</a></li>
<li><a href="#Training">Training and eLearning</a></li>
<li><a href="#WebConferencing">Web conferencing</a></li>
</ul>
</li>
<li><a href="#">All industries and solutions</a></li>
</ul>
</li>
<li>
Products
<ul>
<li><a href="#PCProducts">PC products</a></li>
<li><a href="#MobileProducts">Mobile products</a></li>
<li><a href="#AllProducts">All products</a></li>
</ul>
</li>
<li>
Support
<ul style='width: 200px;'>
<li><a href="#SupportHome">Support home</a></li>
<li><a href="#CustomerService">Customer Service</a></li>
<li><a href="#KB">Knowledge base</a></li>
<li><a href="#Books">Books</a></li>
<li><a href="#Training">Training and certification</a></li>
<li><a href="#SupportPrograms">Support programs</a></li>
<li><a href="#Forums">Forums</a></li>
<li><a href="#Documentation">Documentation</a></li>
<li><a href="#Updates">Updates</a></li>
</ul>
</li>
<li>
Communities
<ul style='width: 200px;'>
<li><a href="#Designers">Designers</a></li>
<li><a href="#Developers">Developers</a></li>
<li><a href="#Educators">Educators and students</a></li>
<li><a href="#Partners">Partners</a></li>
<li type='separator'></li>
<li>
By resource
<ul>
<li><a href="#Labs">Labs</a></li>
<li><a href="#TV">TV</a></li>
<li><a href="#Forums">Forums</a></li>
<li><a href="#Exchange">Exchange</a></li>
<li><a href="#Blogs">Blogs</a></li>
<li><a href="#Experience Design">Experience Design</a></li>
</ul>
</li>
</ul>
</li>
<li>
Company
<ul style='width: 180px;'>
<li><a href="#About">About Us</a></li>
<li><a href="#Press">Press</a></li>
<li><a href="#Investor">Investor Relations</a></li>
<li><a href="#CorporateAffairs">Corporate Affairs</a></li>
<li><a href="#Careers">Careers</a></li>
<li><a href="#Showcase">Showcase</a></li>
<li><a href="#Events">Events</a></li>
<li><a href="#ContactUs">Contact Us</a></li>
<li><a href="#Become an affiliate">Become an affiliate</a></li>
</ul>
</li>
</ul>
</jqx-menu>
<br />
<div style='margin-left: 60px; margin-top: 120px;'>
<div style='font-size: 16px; font-family: Verdana Arial;'>
Settings
</div>
<div style='margin-top: 20px; font-size: 14px; font-family: Verdana Arial; float: left;'>
<jqx-check-box checked='checked'>Enable Animation</jqx-check-box>
<jqx-check-box style='margin-top: 20px;'>Disabled</jqx-check-box>
</div>
<div style='margin-top: 20px; margin-left: 60px; font-size: 14px; font-family: Verdana Arial; float: left;'>
<jqx-check-box checked='checked'>Enable Hover</jqx-check-box>
<jqx-check-box style='margin-top: 20px;' checked='checked'>Auto Open</jqx-check-box>
</div>
<div style='margin-top: 40px; margin-left: 60px; font-size: 14px; font-family: Verdana Arial; float: left;'>
<jqx-check-box >Show Top-Level Arrows</jqx-check-box>
</div>
</div>
</div>
</body>
</html>