jquery - Disable page interactions (eg links, inputs) when off canvas menu is open? -


i have off canvas menu. when open menu small amount of normal page content still visible. when click or tap on area menu closes.

this working when normal content text , images. when link link gets followed, if input input becomes active.

how can disable links, inputs, etc when menu open? can javascript (i'm using jquery)?

the javascript simple. toggle class when click or tap menu , animate page css.

  $('.off-canvas-menu-trigger').click(function() {     $('body').toggleclass('off-canvas-menu-is-open');   });    $('.page-content').click(function() {     $('body').removeclass('off-canvas-menu-is-open');   }); 

its not javascript best solution use css disable entire div , contense being clickable:

pointer-events: none 

Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -