// this is image_share.js Images = new Mongo.Collection("images"); if (Meteor.isClient) { Template.images.helpers({ images: Images.find() }); Template.images.events({ "click .js-image": function (event) { $(event.target).css("width", "50px"); }, "click .js-del-image": function (event) { let imageId = this._id; console.log(imageId); $("#" + imageId).hide(200, function () { Images.remove({ _id: imageId }); }); } }); }