Closed adamgins closed 8 years ago
Do you have any code to share?
This is inside a Meteor onRendered
which is equivalent to a document.onReady
:
var self = this;
var inViewport = require('in-viewport');
var intialRender = true;
self.autorun(function () {
if (!Template.currentData()){
return;
}
var elem = document.getElementById(self.data._id);
inViewport(elem, visible);
function visible(elt) {
// elt === elem
if (intialRender){
//do something
intialRender = false;
}
}
})
I don't getthis error on my local server, only on the test server on the net
I think I have this sorted. It was related to Meteor
thanks for the quick response
Any ideas pls?