I want to use https://isotope.metafizzy.co in my @vue/cli 4.0.5 / Bootstrap 4.3 / jquery 3.4.1 app
I got codepen https://codepen.io/desandro/pen/nFrte example and try tu run it in my vue.js page. I encounetered some problems with rendering into vue, when I have row :
// init Isotope
var $grid = $('.grid').isotope({
itemSelector: '.element-item',
I tried to make :
var itemElem_elem= document.querySelector('.grid')
console.log('itemElem_elem::')
console.log(itemElem_elem)
var $grid = itemElem_elem.isotope({ // eslint-disable-line
itemSelector: '.element-item',
I expected that
$('.grid') == document.querySelector('.grid')
but looks like not, as in the console after itemElem_elem:: I see html code output and next error :
vue.runtime.esm.js?2b0e:619 [Vue warn]: Error in created hook: "TypeError: itemElem_elem.isotope is not a function"
Which way is correct ?
Thanks!
npm install. Try following that route. Please make a codepen/jsFiddle so that we can mess around$refs, which makes it easier to retrieve the element you need.