jsor / jcarousel

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

jCarousel ignores last item on specific markup #735

Closed Binternet closed 9 years ago

Binternet commented 9 years ago

For some unknown reason, jCarousel ignores the last item when I output markup [ http://pastebin.com/5LKUypr6 ] through WordPress [counts 7 items instead of 8] yet when I do a static loop to output 10 items, it counts them correctly [ http://pastebin.com/VJhjBz4S ] couldn't find a reasonable reason for that yet I did reproduce it over and over again.

jsor commented 9 years ago

Hard to say without seeing the complete setup. Do have this online where i can see it?

Binternet commented 9 years ago

Yep, http://212.150.22.55/~esekphone

It's in hebrew so don't break your teeth ;-)

jCarousel appears with the pagination numbers on the top-left. you can see it counts 7 yet I have 8

  • elements.

  • jsor commented 9 years ago

    That was kinda tricky :). The reason is, that your 7th item has a width of 270px, while the other items and the clip element have a width of 271px. So, jCarousel considered the 8th element as part of page 7 since 1 pixel is visible. See also issue #617.

    It should be fixed now. Can you try the updated file?

    Binternet commented 9 years ago

    Updated the file, works like a charm! Thanks!

    jsor commented 9 years ago

    Great. Thanks for reporting this issue!