javascript - JQuery Carousel multiple instances on the same page -
i trying use third-party jquery carousel plugin in project @ work (don't know plugin though). problem when use multiple instances of same plugin on same page 1 of instances updates. think issue how instances setup. have constructed jsfiddle @ here.
the carousel attached .carousel class , instances initiated method shown below:
// enable carousel $.each($('.carousel'), function (i) { $(this).carousel(this.id); });
unlike in local code, in jsfiddle 1 of carousels works. appreciated.
firstly there error when js runs. if in browser dev tools of choice should see
typeerror: properties.slider.swipe not function
once commented out js run correctly if click of next , previous buttons bottom slider run. because use same instance of var
properties
.
i suggest looking @ creating jquery widget existing code, straight forward do. doing can have several instances of same widget running on page together.
Comments
Post a Comment