jsor / jcarousel

Riding carousels with jQuery.
https://sorgalla.com/jcarousel/
MIT License
1.99k stars 734 forks source link

JCarousel Wrap : Circular , empty li elements #790

Closed shilpa835 closed 8 years ago

shilpa835 commented 8 years ago

Hi ,

jcarousel is reloaded in a pop up modal window and the li elements are generated using angular

  • It works fine when we click "next" from 1- 2- 3 and so on . When we scroll "Prev" from our last item for eg .3- 2-1 and close the pop modal window , we click on a link which reloads the jcarousel in popup with new angular array , the "li" elements are empty . // calling on the jcarousel when the modal window pops up $('#degreeModal').on('shown.bs.modal', function (e) { $('.jcarousel').jcarousel('reload');
  • jsor commented 8 years ago

    Could you setup a reproducible test case?

    sryanb commented 8 years ago

    I'm actually experiencing the exact same issue, and have an example:

    http://sesamestreet.org/videos

    To reproduce:

    On the right hand carousel, click the up arrow a couple of times, and select a video. Do this a couple of times, and then choose a new character at the bottom of the screen. Video thumb carousel will load with no thumbnails.

    Everything works properly if you do NOT scroll backwards on the carousel (as if wrap: circular was not set).

    Troubleshooting now, but any suggestions would be helpful. Also loading elements with angular, and calling jcarousel('reload');

    Thanks

    jsor commented 8 years ago

    Doing this gives me some angular related errors in the console, eg.

    Error: [$rootScope:infdig] http://errors.angularjs.org/1.5.5/$rootScope/infdig?p0=10&p1=%5B%5D
    O/<@https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js:6:412
    tf/this.$get</n.prototype.$digest@https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js:143:147
    tf/this.$get</n.prototype.$apply@https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js:145:247
    l@https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js:97:53
    H@https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js:101:190
    dg/</u.onload@https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js:102:229
    sryanb commented 8 years ago

    It's true, and I am looking at this as the root cause but it's still strange that the carousel does not disappear when not using it "backwards" first.

    On Jul 5, 2016, at 01:35, Jan Sorgalla notifications@github.com wrote:

    Doing this gives me some angular related errors in the console, eg.

    Error: [$rootScope:infdig] http://errors.angularjs.org/1.5.5/$rootScope/infdig?p0=10&p1=%5B%5D O/<@https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js:6:412 tf/this.$get</n.prototype.$digest@https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js:143:147 tf/this.$get</n.prototype.$apply@https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js:145:247 l@https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js:97:53 H@https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js:101:190 dg/</u.onload@https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js:102:229 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

    sryanb commented 8 years ago

    I have now resolved that angular issue and the problem still persists. When using carousel 'backwards' first, and then changing character the carousel items do not load.

    jsor commented 8 years ago

    I'm still getting the same error 😕

    sryanb commented 8 years ago

    Have not pushed that to production. Still trying to figure this out.