marcj / css-element-queries

CSS Element-Queries aka Container Queries. High-speed element dimension/media queries in valid css.
http://marcj.github.io/css-element-queries/
MIT License
4.27k stars 487 forks source link

ElementQueries.listen() is not a function #310

Open Alpin52 opened 3 years ago

Alpin52 commented 3 years ago

Hello! I tried to put the code into my site. I ran npm install. It mentioned some packages are out of date. But I installed npm a month ago. When I included line var ElementQueries = require('css-element-queries-1.2.1/src/ElementQueries');

-- I encountered an error. So I had to change it to var ElementQueries = require(['css-element-queries-1.2.1/src/ElementQueries']);

After that I experience the following ERROR:

Uncaught TypeError: ElementQueries.listen is not a function

Alpin52 commented 3 years ago

My code is at http://iancaple.ru/div.html

kethan1 commented 3 years ago

try using this: var ElementQueries = require('css-element-queries/src/ElementQueries');