Help loading a Javascript [login to view URL] carrousel dynamically

I need help implementing a javascript carrousel in a page after it loads using a function rather than the default html initialization. The carrousel was designed to construct itself from a div in the page that has an attribute set but I want a button on the page that dynamically adds a new carrousel and have it initialize correctly.

The carrousel script I am using can be found here:

[url removed, login to view]

I want a function that adds a new carrousel and initializes it.

function addCarrousel(){

var carousel_div = [url removed, login to view]('div');

[url removed, login to view]("data-slick", "{ \"variableWidth\": true, \"slidesToShow\": 1, \"slidesToScroll\": 1, \"swipeToSlide\": true, \"touchThreshold\": 20, \"speed\":200, \"infinite\":false }");


This won't work because the slick script ran when the page first loaded and hasn't reinitialized the new carrousel div. The slick script appears to scan through the document on init and add some elements to implement scrolling. I can see init() and reinit() functions I just don't know how to call them on a new div added after the page has loaded.

Kemahiran: HTML, Javascript

Lihat lagi: div 1 a, loading speed, javascript speed, page loaded https, html infinite, loaded https, html add div, javascript infinite, div add html, javascript call html, javascript function call, call function javascript javascript, master page default page, slick html, javascript div elements, javascript call page, javascript page default, dynamically embed web page javascript, dynamically update total price javascript, set default page javascript

Tentang Majikan:
( 8 ulasan ) Victoria, Canada

ID Projek: #7283124

9 pekerja bebas membida secara purata $25 untuk pekerjaan ini


Hello, I'm expert and ready to complete your project in 2 hours. Thanks .

$29 CAD dalam 0 hari
(31 Ulasan)

Hi There, Can be done now. Please share this project and will give you the perfect work. Thanks for this.

$30 CAD dalam 0 hari
(16 Ulasan)

Dear Sir I am a well experienced website designer & developer.I know well how to fix this problem . So i have the confidence to fix or meet your any kind of need. See My Latest WorkFlow: http://foisalkhanakash Lagi

$25 CAD dalam sehari
(1 Ulasan)

Hello, Di you try the example on demo page? $('.add-remove').slick({ slidesToShow: 3, slidesToScroll: 3 }); $('.js-add-slide').on('click', function() { slideIndex++; $('.add-remove').slick('slickA Lagi

$30 CAD dalam sehari
(3 Ulasan)

Dear client! I'm a representative of Trustyware Company ([login to view URL]). We can do your project asap. Igor Skakun, executive manager of Trustyware

$30 CAD dalam 3 hari
(3 Ulasan)

A proposal has not yet been provided

$25 CAD dalam sehari
(0 Ulasan)

HELLO SIR, Hope You are Doing [login to view URL] Straight To Point, we are expertise with PHP, WordPress Technology and can start your work in short time. Please, update me with more info in chat. Our a Lagi

$24 CAD dalam sehari
(0 Ulasan)

Hi, you just need to reinit slick with $(element).slick() after you have added your new carousel div to document.

$20 CAD dalam sehari
(0 Ulasan)

Hi, I had nothing to do tonight and I have already made your code work. Thus I'll make you pay the minimal amount, just to justify my work (even if it was more for fun than anything ^^). I'll send you a fully doc Lagi

$10 CAD dalam 0 hari
(0 Ulasan)