JQuery Plugin not called

Hello community,
i have a problem and i don’t know how to solve it.

I have a JQuery plugin called “Slick” (http://kenwheeler.github.io/slick/).

On the Template.helper Method i’m loading some data from a mongo db.

The problem is that the page will be rendered and after that the content will be filled, because the Collection.find() method works asynchron.
So the jquery plugin will not be called.

What can i do?

jQuery and reactivity are notoriously error prone for beginners. Look into template level subscript and sub-templates

<template name="outer">
 {{#if Template.subscriptionsReady}}
  {{>inner cursor=cursor}}
<template name="inner">
 <!-- display data -->>
 cursor() {
  return Collection.find();
 // do the slick call