Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
142844 | Feb 21,2019 05:55 PM UTC | Feb 22,2019 11:06 AM UTC | ASP.NET MVC - EJ 2 | 1 |
![]() |
Tags: Sidebar |
//Sidebar created event
function onCreated() {
var defaultSidebarOBJ = document.getElementById('default-sidebar').ej2_instances[0];
//Set mediaQuery property to 900px(When window size is below 900px sidebar automatically closes)
defaultSidebarOBJ.mediaQuery = window.matchMedia('(min-width: 900px)');
}
window.addEventListener("resize", function () {
if (window.innerWidth < 900) {
//When resolution is below mediaQuery resolution enable showBackDrop and set type to “Over”
defaultSidebarOBJ.showBackdrop = true;
defaultSidebarOBJ.type = "Over";
.
.
.
} else {
//When resolution is below mediaQuery resolution enable showBackDrop and set type to “Over”
defaultSidebarOBJ.showBackdrop = false;
defaultSidebarOBJ.type = "Push";
.
.
.
}
}); |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.