Why is jQuery dependency not working?

02/07/2018


I’m extending core Classy theme so I have included my JavaScript code in theme.libraries.yml file like this:

js:
  js/blogger-list.js: {}
dependencies:
  - core/jquery

but still browser console shows error: jQuery is not defined

blogger-list.js is really simple:

(function ($) {
  $(".views-col a").hover(function() {
    $(this).css('background','red');
  });
})(jQuery);

I’m using Drupal 8

What do I need to do?

قالب وردپرس