pull-element icon indicating copy to clipboard operation
pull-element copied to clipboard

multiple targets

Open lawrencenull opened this issue 7 years ago • 2 comments

when using the target selector as ('.test) only returns the first target selector. See https://output.jsbin.com/tozewab

Expected behavior should be to return an array of all selectors.

lawrencenull avatar Dec 05 '18 05:12 lawrencenull

Here is a workaround use nature javascript.

const elems = document.querySelectorAll('.test')
const pulls = Array.from(elems).map(elem => {
  let instance = new PullElement({ ...options, target: elem })
  instance.init()
  return instance
}

Lucifier129 avatar Dec 05 '18 05:12 Lucifier129

Thanks! Works perfectly!

lawrencenull avatar Dec 05 '18 06:12 lawrencenull