0

I am new to Drupal. I have converted Psd to html template after html to drupal theme. After converting all css files are working but javascript files are not working properly. For example javasccript code for navbar fix on top is like this

(window).scroll(function(){
  var sticky = $('.menubar'),
      scroll = $(window).scrollTop();

  if (scroll >= 586) sticky.addClass('fixed');
  else sticky.removeClass('fixed');
});

this code is working on normal template but not in drupal theme.Here is the libraries.ylm file

lobal-css:
  css:
    theme:
      css/bootstrap.css: {}
      css/font-awesome.css: {}
      css/responsive-menu.min.css: {}
      css/style.css: {}
      
global-js:
  js:
    js/bootstrap.js: {}
    js/jquery.singlePageNav.min.js: {} 
    js/responsive-menu.js: {} 
    js/customscript.js: {}    
  dependencies:
      - core/jquery 

customscript.js is having all custom javascript code. Please help me.

Mahmood Mohammed
  • 187
  • 2
  • 4
  • 14

0 Answers0