javascript - Meteor Collection returns none when deployed on production -
i'm working on meteor application has slider (revolution slider plugin exact) on homepage. have template helper pulls images on collection. works perfect locally, when deployed on meteor's free server, returns nothing collection.
also, tried using imagesloaded plugin check if images loaded before running script trigger slider, however, still not work. i've checked developer tools , found out did not load @ all. 'sliders' helper returns nothing.
what think might problem. have been solving issue quite time , run out of options.
hope can me.
thanks!
by way, here's code helper:
template.homepageslider.helpers({ sliders: function() { return _.map(homepagesliders.find({}, {fields: {url:1, client_name:1}}).fetch(), function(val, index) { return {value: val, active: (index == 0 ? "item active" : "item")} }); } });
html:
<!-- slide --> {{#each sliders}} <li class="revolution-mch-1" data-transition="fade" data-slotamount="3" data-masterspeed="1000" data-title="{{this.value.client_name}}"> <!-- main image --> <img id="homepage-img" src="{{this.value.url}}" alt="darkblurbg" data-bgfit="cover" data-bgposition="left top" data-bgrepeat="no-repeat"> <div class="tp-caption finewide_verysmall_white_mw sft start" data-x="left" data-hoffset="50" data-y="bottom" data-voffset="-35" data-speed="1500" data-start="100" data-easing="back.easeinout" data-endeasing="power1.easein" data-endspeed="300"> <i class="fa fa-info"></i> {{this.value.client_name}} </div> </li> {{/each}} <!-- end slide -->
Comments
Post a Comment