hello world,
I am new to meteor.
Today I am using meteor 1.0.5
I want to learn how to get inner-html from a rendered element.
I know how to do this using jquery.
I want to learn how to do it the meteor way.
I have a template named t2.html
In it I have a pre-element with id set to ‘id1’.
Inside the pre-element I have some text.
I verified that meteor can serve t2.html.
Next I created t2.js and put this syntax in it:
if (Meteor.isClient) {
Template.t2.onRendered(function() {
var myelem = this.find("id1");
var xyz = 1.1; });}
I think my call to this.find() is failing.
According to the js-console in my browser,
myelem stays null.
Question:
What is the meteor way to get inner-html from a rendered element?