abhiomkar / portfolio-js

Tiny JavaScript carousel library with horizontal scrolling and all the goodness.
https://portfoliojs.com
80 stars 30 forks source link

Looks like this is broken in jQuery 3.3.1 #50

Open vbbalaji opened 5 years ago

vbbalaji commented 5 years ago

Im using JQ 3.3.1 and Im getting a warning and error.

Warning: jquery-3.3.1.min.js:2 jQuery.Deferred exception: portfolioEl.querySelector is not a function TypeError: portfolioEl.querySelector is not a function at new Portfolio (https://unpkg.com/portfolio-js@2.1.5/dist/portfolio.umd.js:26:31) at HTMLDocument. (http://localhost/mysupport/customers/customers.html:408:9) at l (http://localhost/mysupport/js/jquery-3.3.1.min.js:2:29375) at c (http://localhost/mysupport/js/jquery-3.3.1.min.js:2:29677) undefined

Error: jquery-3.3.1.min.js:2 Uncaught TypeError: portfolioEl.querySelector is not a function at new Portfolio (portfolio.js:14) at HTMLDocument. (customers.html:408) at l (jquery-3.3.1.min.js:2) at c (jquery-3.3.1.min.js:2)

juanem1 commented 5 years ago

@vbbalaji you can use a workaround: new Portfolio( document.querySelector('.my-image-gallery') );