Click event with class

Hi all,

I have been suffering for days from running js on framework7…

Here is my js code to create a cart page

var removeCartItemButtons = document.getElementsByClassName(‘button-remove’);

for (var i = 0; i < removeCartItemButtons.length; i++){
var button = removeCartItemButtons[i]
button.addEventListener(‘click’, function() {

I checked that store.js is loaded successfully by using this code in webpack.config.js

module.exports = {

mode: env,


['./src/js/app.js', './src/js/store.js'],  

But the problem is that click event is not working and no console.log message is displayed (“clicked”) when clicking button with the class ‘button-remove’

I checked that click event with this class (‘button-remove’) is now working on black page (without framework7)

What is the problem and how i can solve it…

Thank you in advance and I’ll wait for your reply

Possible duplicate queston of Button is not working