vvvmax / unitegallery

Unite Gallery - Responsive jQuery Image and Video Gallery Plugin. Aim to be the best gallery on the web on it's kind. See demo here:
http://unitegallery.net
MIT License
530 stars 157 forks source link

Error when calling api.selectItem() #24

Closed DevCilla closed 9 years ago

DevCilla commented 9 years ago

Hello, I got the following error when using the api.selectItem() call:

Uncaught TypeError: Cannot read property 'hasClass' of undefinedg @ unitegallery.min.js:7
UGThumbsGeneral.setThumbSelected @ unitegallery.min.js:7
(anonymous function) @ unitegallery.min.js:7
m.event.dispatch @ jquery.min.js:3
m.event.add.r.handle @ jquery.min.js:3
m.event.trigger @ jquery.min.js:3
(anonymous function) @ jquery.min.js:3m.extend.each @ jquery.min.js:2
m.fn.m.each @ jquery.min.js:2
m.fn.extend.trigger @ jquery.min.js:3
UniteGalleryMain.selectItem @ unitegallery.min.js:4
UG_API.selectItem @ unitegallery.min.js:3
app.BeautyView.Backbone.View.extend.showImageModal @ model_view.js:27
m.event.dispatch @ jquery.min.js:3
m.event.add.r.handle @ jquery.min.js:3

here are my codes:

function openGallery(){
   var groupNo = e.target.getAttribute('grp');
   var imgNo = e.target.getAttribute('data-id');
//gallery is an array that stores several unitegallery
   gallery[groupNo].selectItem(imgNo);
   gallery[groupNo].enterFullscreen(); 
}

Am i using the api call correctly?

vvvmax commented 9 years ago

Hi. should work. Please show me some link to it in your server, I'll take a look.

On Mon, Aug 31, 2015 at 5:45 AM, pokemonTrainee notifications@github.com wrote:

Hello, I got the following error when using the api.selectItem() call:

Uncaught TypeError: Cannot read property 'hasClass' of undefinedg @ unitegallery.min.js:7 UGThumbsGeneral.setThumbSelected @ unitegallery.min.js:7 (anonymous function) @ unitegallery.min.js:7 m.event.dispatch @ jquery.min.js:3 m.event.add.r.handle @ jquery.min.js:3 m.event.trigger @ jquery.min.js:3 (anonymous function) @ jquery.min.js:3m.extend.each @ jquery.min.js:2 m.fn.m.each @ jquery.min.js:2 m.fn.extend.trigger @ jquery.min.js:3 UniteGalleryMain.selectItem @ unitegallery.min.js:4 UG_API.selectItem @ unitegallery.min.js:3 app.BeautyView.Backbone.View.extend.showImageModal @ model_view.js:27 m.event.dispatch @ jquery.min.js:3 m.event.add.r.handle @ jquery.min.js:3

here are my codes:

function openGallery(){ var groupNo = e.target.getAttribute('grp'); var imgNo = e.target.getAttribute('data-id');//gallery is an array that stores several unitegallery gallery[groupNo].selectItem(imgNo); gallery[groupNo].enterFullscreen(); }

Am i using the api call correctly?

— Reply to this email directly or view it on GitHub https://github.com/vvvmax/unitegallery/issues/24.

DevCilla commented 9 years ago

Sorry for the late reply.

Seems like the bug was not related to unitegallery as I modified some of my project source codes and now the gallery works brilliantly :)

vvvmax commented 9 years ago

ok, cool.

On Fri, Sep 4, 2015 at 7:26 AM, DevCilla notifications@github.com wrote:

Sorry for the late reply.

Seems like the bug was not related to unitegallery as I modified some of my project source codes and now the gallery works brilliantly :)

— Reply to this email directly or view it on GitHub https://github.com/vvvmax/unitegallery/issues/24#issuecomment-137647145.