Template.test.rendered = function() {
if(!this._rendered) {
this._rendered = true;
//this.$(".screenshot").lightbox();
$(".screenshot").lightbox(); // Tried it as well
}
};
and tried this one as well:
Meteor.startup(function () {
// code to run on server at startup
$(".screenshot").lightbox();
});
meteor list
autopublish 1.0.3 Publish the entire database to all clients
insecure 1.0.3 Allow all database writes by default
jquery 1.11.3_2 Manipulate the DOM using CSS selectors
meteor-platform 1.2.2 Include a standard set of Meteor packages in your app
I get the following when running them: “TypeError: $(…).lightbox is not a function”
Can you manually init a lightbox after all DOM has been rendered from BROWSER CONSOLE? $(".screenshot").lightbox();? Is it works? Do you see the lightbox? May be your lightbox plugin doesnt work?