MCPcopy Create free account
hub / github.com/codrops/GridItemHoverEffect / constructor

Method constructor

js/card2.js:52–60  ·  view source on GitHub ↗
(DOM_el)

Source from the content-addressed store, hash-verified

50 cardBoxesArr = [];
51
52 constructor(DOM_el) {
53 this.DOM.el = DOM_el;
54 this.DOM.img = this.DOM.el.querySelector('.card__img');
55 this.boxes = [...this.DOM.el.querySelectorAll('.card__box')];
56 // Initialize CardBox instances
57 this.boxes.forEach(boxEl => this.cardBoxesArr.push(new CardBox(boxEl)));
58
59 this.initEvents();
60 }
61
62 get cardBoxElements() {
63 return this.cardBoxesArr.map(box => box.DOM.el);

Callers

nothing calls this directly

Calls 1

initEventsMethod · 0.95

Tested by

no test coverage detected