Applying Jquery Modification To Meteor Site
I am using a free template from HTML5up which has a main.js and util.js files. These contain code that control the look and feel of the sight. I have moved these files to the the c
Solution 1:
You now have only one template, this one is rendered once (on page load).
You want to run the initialisation of the jQuery functions after Meteor renders the HTML for each image. To do this you can call a subtemplate in the imageT template {{each}}.
<templatename="ImageT">
{{#each imageUrl}}
{{> image}}
{{/each}}
</template><templatename="image"><articleclass="thumb"><ahref="images/{{image}}"class="image"><imgsrc="images/{{image}}"alt="" /></a></article></template>
Then the JS
Template.Image.onRendered = function() {
//Put code to run every time an image is rendered below
});
Also see the Meteor docs Template.myTemplate.onRendered
Post a Comment for "Applying Jquery Modification To Meteor Site"