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

Method constructor

js/card3.js:42–49  ·  view source on GitHub ↗
(DOM_el)

Source from the content-addressed store, hash-verified

40 cardBoxesArr = [];
41
42 constructor(DOM_el) {
43 this.DOM.el = DOM_el;
44 this.DOM.img = this.DOM.el.querySelector('.card__img');
45 this.boxes = [...this.DOM.el.querySelectorAll('.card__box')];
46 this.boxes.forEach(boxEl => this.cardBoxesArr.push(new CardBox(boxEl)));
47
48 this.initEvents();
49 }
50
51 get cardBoxElements() {
52 return this.cardBoxesArr.map(box => box.DOM.el);

Callers

nothing calls this directly

Calls 1

initEventsMethod · 0.95

Tested by

no test coverage detected