I have a template that looks like this. It used to work with regular html file, however, it is not working now.
This is my test.html
file.
<template name="test">
<a href="xxxxxxxx" class="screenshot">
<img src="xxxxxx" alt="Screenshot" class="thumbnail"/>
<span class="screenshot-zoom"></span>
</a>
<script>
$(function () {
$(".screenshot").lightbox();
});
</script>
</template>
EDIT1
I follow https://stackoverflow.com/a/10119993/772481 and try similar test, but still not working.
->test.html
<template name="test">
<a href="./img/screenshots/placeholder.gif" class="screenshot">
<img src="http://placehold.it/300x120" alt="Screenshot" class="thumbnail"/>
<span class="screenshot-zoom"></span>
{{add_my_special_behavior}}
</a>
</template>
->screenshot.js
Template.test.add_my_special_behavior = function () {
Meteor.defer(function () {
// do stuff to it
$(".screenshot").lightbox();
});
// return nothing
};