jquery - How to add element on jCarouselLite at runtime? -
i having hard time achieve thing. want add element on ul
on runtime, doesn't work on jcarousellite.
when add li
element, adds @ bottom not aligned flow.
for mean, see code here
hope help.
jcarousellite
doesn't appear support dynamic addition of elements. may want consider using jcarousel instead seem have support this.
when add li
being wrapped onto next line because jcarousellite
has set explicit width on ul
element. can stop li
wrapping, adding width add new li
item:
$("#list").width(52 + $("#list").width());
however, doesn't solve problem because jcarousel
object contains private member variable itemlength
uses boundary checking, stops before can end of carousel , see new added item.
you may able fudge removing + recreating carousel, if need functionality, feels should try , use plugin supports out of box.
Comments
Post a Comment